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

Sticky Session #267

Open
lambertpan opened this issue Jul 25, 2019 · 3 comments · May be fixed by #711
Open

Sticky Session #267

lambertpan opened this issue Jul 25, 2019 · 3 comments · May be fixed by #711

Comments

@lambertpan
Copy link

I have enabled the SessionAffinity on the service, and from kube-ingress-controller I expect something similar to nginx-cookie - Do we have anything like this? Or, how to handle session affinity with kube-ingress-aws-controller?

@szuecs
Copy link
Member

szuecs commented Jul 25, 2019

@lambertpan Can you check if the Amazon ALB supports sticky sessions?

@drmudgett
Copy link

To revisit this @szuecs - yes ALB supports sticky sessions. I believe the fix to enable this would just be to update the Listener like so:

                                template.AddResource("HTTPListener", &cloudformation.ElasticLoadBalancingV2Listener{
                                        DefaultActions: &cloudformation.ElasticLoadBalancingV2ListenerActionList{
                                                {
                                                        Type:           cloudformation.String("forward"),
                                                        TargetGroupArn: cloudformation.Ref(httpTargetGroupName).String(),
                                                        TargetGroupStickinessConfig: &cloudformation.ElasticLoadBalancingV2ListenerTargetGroupStickinessConfig{
                                                                Enabled: cloudformation.string("true"),
                                                                DurationSeconds: cloudformation.Integer(3600)
                                                        },
                                                },
                                        },

If that sounds right, I can throw together a PR for it.

@szuecs
Copy link
Member

szuecs commented Aug 15, 2024

Hi, took a while to read the backlog from vacation!

Yeah from my side looks good. What we need to define is an annotation and add it to the list https://github.com/zalando-incubator/kube-ingress-aws-controller/tree/master?tab=readme-ov-file#annotations , and use it to enable sticky session by ingress/routegroup annotation. Default could be non-sticky.
Feel free to propose a PR and we can review it!

Every feature PR comes with test and docs :)

@drmudgett drmudgett linked a pull request Aug 15, 2024 that will close this issue
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 a pull request may close this issue.

3 participants