Skip to content

tcp proxy: connect to upstream when downstream connections#175

Merged
mattklein123 merged 3 commits intomasterfrom
tcp_proxy_refactor
Oct 28, 2016
Merged

tcp proxy: connect to upstream when downstream connections#175
mattklein123 merged 3 commits intomasterfrom
tcp_proxy_refactor

Conversation

@mattklein123
Copy link
Copy Markdown
Member

The previous behavior was to connect only when data is received on the
downstream connection. Unfortunately this breaks protocols which connect
and the server is the first half to send data (e.g., mysql).

This required a refactor to handle the case where we immediately disconnect
downstream during network filter chain creation.

This commit also cleans up the filter factory functions so that they take a
filter manager interface vs. a connection interface to force filters to
operate via the filter callbacks.

The previous behavior was to connect only when data is received on the
downstream connection. Unfortunately this breaks protocols which connect
and the server is the first half to send data (e.g., mysql).

This required a refactor to handle the case where we immediately disconnect
downstream during network filter chain creation.

This commit also cleans up the filter factory functions so that they take a
filter manager interface vs. a connection interface to force filters to
operate via the filter callbacks.
@mattklein123
Copy link
Copy Markdown
Member Author

cc @lyft/network-team @enricoschiattarella

Copy link
Copy Markdown
Member

@RomanDzhabarov RomanDzhabarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, lgtm otherwise

parent_.num_connections_++;

// If the connection is already closed, we can just let this connection immediately die.
if (new_connection->state() != Network::Connection::State::Closed) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also rule out State::Closing here? (do only for State::Open)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that was on purpose, to allow for write flushing if needed.

@mattklein123 mattklein123 merged commit c172a40 into master Oct 28, 2016
@mattklein123 mattklein123 deleted the tcp_proxy_refactor branch October 28, 2016 18:54
wolfguoliang pushed a commit to wolfguoliang/envoy that referenced this pull request Jan 23, 2021
zh-translation:/intro/arch_overview/security/ssl.rst
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Fixes #175
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Fixes #175
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: JP Simard <jp@jpsim.com>
arminabf pushed a commit to arminabf/envoy that referenced this pull request Jun 5, 2024
Signed-off-by: zufardhiyaulhaq <zufardhiyaulhaq@gmail.com>
mathetake added a commit that referenced this pull request Mar 3, 2026
**Commit Message**:

This fixes the placement of `ignore` section
in dependabot.yml.

**Related Issues/PRs (if applicable)**:

Follow up on #174

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants