Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: cookie based consistent hashing #3444

Merged
merged 3 commits into from
May 31, 2024
Merged

Conversation

arkodg
Copy link
Contributor

@arkodg arkodg commented May 21, 2024

@arkodg arkodg requested a review from a team as a code owner May 21, 2024 00:26
@arkodg
Copy link
Contributor Author

arkodg commented May 21, 2024

have two opens questions here for @envoyproxy/gateway-maintainers and @envoyproxy/gateway-reviewers

  1. should the Cookie structure get split up into two more sub fields - Existing and Generated to make it easier to divide up the cookie fields, else it can get confusing ?
  2. Should the Attributes field be renamed to ExtraAttributes ?

Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.39%. Comparing base (bcaa1b0) to head (1914ea6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3444      +/-   ##
==========================================
- Coverage   67.45%   67.39%   -0.06%     
==========================================
  Files         166      166              
  Lines       20058    20058              
==========================================
- Hits        13531    13519      -12     
- Misses       5548     5558      +10     
- Partials      979      981       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhaohuabing
Copy link
Member

zhaohuabing commented May 21, 2024

should the Cookie structure get split up into two more sub fields - Existing and Generated to make it easier to divide up the cookie fields, else it can get confusing ?

One Cookie structure won't cause confusion to me. Two separate structures seem excessive since there is only one optional TTL field.

Should the Attributes field be renamed to ExtraAttributes ?

Are there any "built-in" default Attributes? If not, the "Extra" is not needed.

@arkodg
Copy link
Contributor Author

arkodg commented May 21, 2024

should the Cookie structure get split up into two more sub fields - Existing and Generated to make it easier to divide up the cookie fields, else it can get confusing ?

One Cookie structure won't cause confusion to me. Two separate structures seem excessive since there is only one optional TTL field.

Should the Attributes field be renamed to ExtraAttributes ?

Are there any "built-in" default Attributes? If not, the "Extra" is not needed.

TTL field translates into Max-Age attribute

@zhaohuabing
Copy link
Member

TTL field translates into Max-Age attribute

Then "Extra" makes sense to me, though I don't have a strong preference for it.

Relates to envoyproxy#2624

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@arkodg arkodg requested a review from a team May 31, 2024 00:20
@shawnh2
Copy link
Contributor

shawnh2 commented May 31, 2024

  1. should the Cookie structure get split up into two more sub fields - Existing and Generated to make it easier to divide up the cookie fields, else it can get confusing ?

  2. Should the Attributes field be renamed to ExtraAttributes ?

  1. Just Cookie sounds good to me, by the definition here, cookie is only be generated if it is not exist in current request. So it works more like a default option. Flattened fields with clear explanations as comments will not cause any confusion to me.

  2. Attributes sounds good too.

Copy link
Member

@zhaohuabing zhaohuabing left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@arkodg arkodg merged commit 18f8c00 into envoyproxy:main May 31, 2024
26 checks passed
@arkodg arkodg deleted the api-cookie-hash branch May 31, 2024 22:50
arkodg pushed a commit that referenced this pull request Jun 1, 2024
fix missing gen-check

Signed-off-by: shawnh2 <shawnhxh@outlook.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.

3 participants