Questions tagged [sticky-session]

A simple performant way to use socket.io with a cluster. https://github.com/indutny/sticky-session

119 questions
3
votes
1 answer

Is there a way to encode session stickiness info about "all" target groups in AWSALB cookie in "one" request?

Our ALB is registered with multiple target groups. Each target group is a separate web application serving a different portion of the website under the same domain. Here's snippet from AWS docs about sticky session cookie encoding practice When a…
3
votes
2 answers

Kubernetes ingress-nginx sticky session isn't working with spring security

I have a stateful spring application and I want to deploy it to kubernetes cluster. There will be more than one instance of the application so i need to enable sticy session using ingress-nginx controller. I made the following…
savas
  • 241
  • 2
  • 9
3
votes
1 answer

HAProxy stick-table store a custom value

I'd like to store a custom "value" in stick-table and use that in another ACL to select the server. I've this config, which creates stick-table with the header value "x-external-id" as key and server-id as its value. frontend frontend bind…
3
votes
2 answers

Sticky Sessions with docker swarm

I have a dockerized node.js app that uses socket.io Via docker compose I run 2 replicas for the app on two diffrent containers on the same server. However the requests that come to the servers is distributed in a round robin fashion. Is there a way…
3
votes
2 answers

Set jvmRoute in spring boot 2.0.0

For sticky session i need to set the jvmRoute of the embedded tomcat. Actually only a System.setProperty("jvmRoute", "node1"); is required, but i want to set a via application.properties configurable property. I don't know how and when to set this…
davey
  • 1,666
  • 17
  • 24
3
votes
0 answers

Preserve Heroku session affinity when scaling up

According to the Heroku documentation when session affinity is turned on and number of Dynos (nodes) scales up the existing traffic is evenly distributed to the new Dynos. This has affect that client of 'old' Dynos are assigned to the Dynos they…
ps-aux
  • 11,627
  • 25
  • 81
  • 128
3
votes
1 answer

Apache load balance tomcat websocket

I am currently developing a websocket application, which is deployed on a Tomcat server. Because of the huge number of users I would like to distribute the workload to multiple Tomcat instances. I decided to use Apache for load balancing. Now I have…
Elke
  • 31
  • 1
  • 3
3
votes
1 answer

sticky-session vs socket.io-sticky-session node js library ! Which is better?

I have come across this two sticky-session library for node js https://github.com/indutny/sticky-session https://github.com/wzrdtales/socket-io-sticky-session What is the difference between two, My need is just to achieve socket with node clusters,…
Bikash
  • 1,452
  • 1
  • 15
  • 24
3
votes
2 answers

Can AWS ELB sticky sessions be used for backend requests?

I currently have my web application hosted on AWS, and I use two ELB instances, one to load balance the frontend requests to the app servers, and a second to load balance the backend requests FROM the app servers TO the API servers, like so (sorry…
SilentMiles
  • 624
  • 6
  • 8
3
votes
0 answers

How to expire haproxy's stick table entry only after the closing of all sessions which used it

I'm currently using Haproxy 1.5, I have a backend with 2 servers. My app servers receive connection from two clients and I want both of them to be attributed to the same server. All connections have a url parameter X and sessions that should be…
2
votes
0 answers

Request Based Sticky session with Spring Cloud Loadbalancer not working as expected

I am using Spring reactor and WebClient for load balance purposes. I want to use the Request-based Sticky Session for LoadBalancer as follows: Have service A that can invoke REST end points on service B or service C. Both B and C can have multiple…
2
votes
1 answer

Is there a way to provide custom value other than ClientIP for sessionAffinity in kubernetes?

First of all request goes to proxy service that i've implemented, service forwards request to pods randomly without using sessionAffinity. I want to send requests to same pod based on custom value that i've set in request parameters using post…
2
votes
0 answers

AWS Application load balancer rule not working for cookies ? What could have gone wrong?

I work in the dev-ops team at my company. Recently, we shifted to aws's application load balancer and we are forwarding the request based on a cookie's value. For some reason, the rule isn't working and AWS doesn't support logs to get information on…
2
votes
1 answer

Azure Load Balancing with sticky session

I have web API service which I planned to host in Azure environment probably in VM. My application is using sticky session and I have to enable the Load Balancer in Azure. Can you please suggest best approach to load balance the application Or Can…
Abdul Azeez
  • 807
  • 10
  • 18
2
votes
1 answer

custom load balancing within kubernetes

I am trying to deploy an application with load-balancing within kubernetes below are my intended deployment diagram ideally, the application is deployed by a set of pods using k8s deployment with type of "backend" normally, user instances are…