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

GEP-1619: Add context on session persistence naming #2904

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

gcs278
Copy link
Contributor

@gcs278 gcs278 commented Mar 26, 2024

What type of PR is this?
/kind gep

What this PR does / why we need it:
Add a section "Naming" which outlines our decision for choosing session persistence and session affinity. Also recognize sticky session as a valid alternative name.

Update section about session affinity to include the fact that session affinity CAN use cookies or headers. Also add details about the difference between persistence and affinity across proxy restarts or backend pool change.

Discussion: #2893

Which issue(s) this PR fixes:
Fixes #
Updates for #1619

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Mar 26, 2024
@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added kind/gep PRs related to Gateway Enhancement Proposal(GEP) cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Mar 26, 2024
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

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

Thanks for adding all the extra context.

/ok-to-test
/cc @youngnick @robscott

Comment on lines 120 to 122
One concern for using the name "session persistence" is that it may confuse the idea of persisting a session to storage.
This confusion is particularly common among Java developers, as Java defines session persistence as storing a session to
disk.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
One concern for using the name "session persistence" is that it may confuse the idea of persisting a session to storage.
This confusion is particularly common among Java developers, as Java defines session persistence as storing a session to
disk.
> **Note**: One concern for using the name "session persistence" is that it may confuse the idea of persisting a session to storage.
> This confusion is particularly common among Java developers, as Java defines session persistence as storing a session to disk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 27, 2024
@youngnick
Copy link
Contributor

This is a great update, nice work @gcs278. Happy to LGTM as-is once it's move out of draft.

Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks @gcs278!

/approve

**Accepted definitions of "strong session affinity":**

- Session Persistence (preferred)
- Sticky Sessions
Copy link
Member

Choose a reason for hiding this comment

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

I'm not really sure it's helpful or useful to have multiple ways to refer to this concept in Gateway API. I think it may be useful to have docs that mention some common alternative names for what we refer to as "Session Persistence", but I'd rather just settle on one name for this concept within Gateway API and run with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea that's a good point. Better to keep it simple with less options for folks to remember. Removed.

and weak session affinity (what this GEP calls session affinity) which we will define further in [The Relationship of Session Persistence and Session Affinity](#the-relationship-of-session-persistence-and-session-affinity).
In this context, "strong" implies a guarantee, while "weak" indicates a best-effort approach.

Here's a survey of how some implementations refers to these ideas:
Copy link
Member

Choose a reason for hiding this comment

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

Nit: May want to include Envoy itself here, which uses "Stateful Session" terminology https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/stateful_session_filter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. But they also refer to it as "session stickiness". I'll put both.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gcs278, robscott, shaneutt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@robscott robscott added this to the v1.1.0 milestone Mar 28, 2024
@shaneutt shaneutt requested a review from robscott April 2, 2024 14:10
@gcs278 gcs278 marked this pull request as ready for review April 3, 2024 21:14
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 3, 2024
Add a section "Naming" which outlines our decision for choosing session
persistence and session affinity.

Update section about session affinity to include the fact that session
affinity CAN use cookies or headers. Also add details about the
difference between persistence and affinity across proxy restarts or
backend pool change.
@gcs278 gcs278 force-pushed the gep1619-naming-update branch from 0488561 to 43b93be Compare April 5, 2024 02:13
Copy link
Contributor Author

@gcs278 gcs278 left a comment

Choose a reason for hiding this comment

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

@robscott @shaneutt Thanks for a quick review. Sorry I got caught up with other things.

Comments should be addressed.

and weak session affinity (what this GEP calls session affinity) which we will define further in [The Relationship of Session Persistence and Session Affinity](#the-relationship-of-session-persistence-and-session-affinity).
In this context, "strong" implies a guarantee, while "weak" indicates a best-effort approach.

Here's a survey of how some implementations refers to these ideas:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. But they also refer to it as "session stickiness". I'll put both.

**Accepted definitions of "strong session affinity":**

- Session Persistence (preferred)
- Sticky Sessions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea that's a good point. Better to keep it simple with less options for folks to remember. Removed.

Comment on lines 120 to 122
One concern for using the name "session persistence" is that it may confuse the idea of persisting a session to storage.
This confusion is particularly common among Java developers, as Java defines session persistence as storing a session to
disk.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@youngnick
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 5, 2024
@shaneutt shaneutt removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 5, 2024
@k8s-ci-robot k8s-ci-robot merged commit 4923a4e into kubernetes-sigs:main Apr 5, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants