Skip to content

filter_state: add new envoy.hashable_string object factory - #35731

Closed
agrawroh wants to merge 1 commit into
envoyproxy:mainfrom
agrawroh:add_hashable_string
Closed

agrawroh wants to merge 1 commit into
envoyproxy:mainfrom
agrawroh:add_hashable_string

Conversation

@agrawroh

Copy link
Copy Markdown
Member

Background

See: #35711

Changes

This PR adds a new generic string object factory with hashing interface in filter state with key envoy.hashable_string which could be used when unique upstream connection needs to be picked based on the hash of the value of filter state being shared.


Commit Message: filter_state: add new envoy.hashable_string object factory.
Additional Description: See Background Section.
Risk Level: Low
Testing: Unit Tests
Docs Changes: Added the description of the new object factory.
Release Notes: Added
Platform Specific Features: N/A

Signed-off-by: Rohit Agrawal [email protected]

@wbpcode

wbpcode commented Aug 16, 2024

Copy link
Copy Markdown
Member

Before to start the fixing, did we get a conclusion about the original problem?

Ideally, the connect upgrade should ensure the filter state should be set only once?

@agrawroh

Copy link
Copy Markdown
Member Author

@wbpcode Per the response from @kyessenov here, it seems that the issue is happening as both the outer and the internal listeners are HTTP and the connections are getting pooled. The suggestion to implement a new hashable interface is from Kuat so that we can uniquely distinguish the state while picking the connections rather than re-using the connections across different requests having different filter metadata.

cc @kyessenov

@wbpcode

wbpcode commented Aug 16, 2024 •

Copy link
Copy Markdown
Member

So, as my previous guession, part of requests don't upgrade to connect? (Not use connect)

@agrawroh
agrawroh force-pushed the add_hashable_string branch from d5b17a9 to 90a0854 Compare August 16, 2024 19:18
@agrawroh

Copy link
Copy Markdown
Member Author

So, as my previous guession, part of requests don't upgrade to connect? (Not use connect)

@wbpcode The outer (downstream) listener accepts mixed traffic and based on the route matching rules, send the raw TCP requests to the internal listener for decapsulating. Internal listener should just be receiving only one type of traffic i.e. with raw TCP which needs decapsulating but given the behavior of receiving mixed traffic on the outer listener, is it possible that somehow the connections to internal listener are being shared?

I am not very familiar with this code but implementing the hashing solved the issue and we no longer see any state sharing.

@adisuissa

Copy link
Copy Markdown
Contributor

Assigning stakeholders from the issue.
/assign @wbpcode @kyessenov

@kyessenov

Copy link
Copy Markdown
Contributor

We need to root cause the linked issue since it is unexpected with pure TCP streams before adding features. I'll try to reproduce locally when I get a chance.

/wait

@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale stalebot believes this issue/PR has not been touched recently label Sep 19, 2024
@agrawroh

Copy link
Copy Markdown
Member Author

@kyessenov Just checking if you got a chance to take a look at the underlying issue. I can share anything else you need for a local repro.

@github-actions github-actions Bot removed the stale stalebot believes this issue/PR has not been touched recently label Sep 20, 2024
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale stalebot believes this issue/PR has not been touched recently label Oct 20, 2024
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale stalebot believes this issue/PR has not been touched recently waiting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants