Questions tagged [sticky-session]

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

98 questions
269
votes
2 answers

Sticky and NON-Sticky sessions

I want to know the difference between sticky- and non-sticky sessions. What I understood after reading from internet: Sticky : only single session object will be there. Non-sticky session : session object for each server node
Sunny Gupta
  • 6,219
  • 14
  • 47
  • 80
30
votes
1 answer

Is the most recent AWSALB cookie required? (AWS ELB Application Load Balancer)

Observations When using an Amazon ELB Application Load Balancer and working with Sticky Sessions the load balancer inserts a cookie named AWSALB in the first request. To let the next request stick to the same target node (EC2 instance) the cookie…
mgd
  • 3,484
  • 3
  • 19
  • 29
11
votes
2 answers

Sticky sessions on Kubernetes cluster

Currently, I'm trying to create a Kubernetes cluster on Google Cloud with two load balancers: one for backend (in Spring boot) and another for frontend (in Angular), where each service (load balancer) communicates with 2 replicas (pods). To achieve…
10
votes
1 answer

Scaling with sticky sessions and websockets

Initially we have two AWS EC2 instances with node.js running behind a load balancer with sticky sessions. As the load increases more instances are added. But we are facing problems with this approach. As out application is mainly for workshops, the…
8
votes
2 answers

Can't get sticky sessions working in AWS?

I've got a web app running in tomcat instances on EC2 and I can't for the life of me get sticky sessions to work on the load balancer. I've followed all the steps in…
user1072692
  • 647
  • 1
  • 7
  • 18
8
votes
2 answers

Django user sessions with AWS Load Balancer stickiness turned off

I'm using AWS Elastic Beanstalk with EC2 servers behind an Elastic Load Balancer (ELB). I have "sticky sessions" on the ELB enabled because that's the only way I can get django user sessions to work correctly. However, during times of peak traffic,…
7
votes
3 answers

Nodejs Clustering with Sticky-Session

const cluster = require('cluster'); const http = require('http'); const numCPUs = require('os').cpus().length; if (cluster.isMaster) { console.log(`Master ${process.pid} is running`); // Fork workers. for (let i = 0; i < numCPUs; i++) { …
codefreaK
  • 3,376
  • 4
  • 29
  • 56
6
votes
1 answer

nginx-ingress sticky-session for websocket application

I have a websocket .net application inside K8s cluster. I need to implement sticky session for the websocket using the nginx opensource. I have read the documentation of nginx and kubernetes.…
Madie
  • 221
  • 2
  • 10
6
votes
0 answers

How to make sticky session works with socket.io (w/ or w/o pm2)?

Although the socket.io document said 'sticky session' can make socket.io work with node cluster. I just can't make it work. I find pm2 had several issues opened against it, the closest solution I can find is this, "force to use websock option only",…
Qiulang
  • 5,733
  • 4
  • 47
  • 82
6
votes
0 answers

Spring Boot JSESSIONID secure flag not set over HTTPS

We have build a Cloud Foundry app using Liberty for Java. When testing the app we found that the SSL cookie did not have the secure flag set. Issue: The JSESSIONID did not have the Secure flag set while the _VCAP_ID had the Secure flag set We have…
user1982350
  • 1,781
  • 2
  • 11
  • 11
5
votes
1 answer

How to do zero-downtime rolling updates for app with (long-lived) sticky sessions using containers

Am trying to figure out how to provide zero-downtime rolling updates of a webapp that has long-lived interactive user sessions that should be sticky, based on a JSESSIONID cookie. For this (and other) reasons I'm looking at container technology,…
Paul
  • 177
  • 2
  • 10
5
votes
1 answer

docker-compose scale with sticky sessions

I have a webserver that requires websocket connection in production. I deploy it using docker-compose with nginx as proxy. So my compose file look like this: version: '2' services: app: restart: always nginx: restart: always …
orshachar
  • 4,367
  • 12
  • 40
  • 59
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

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,057
  • 11
  • 18
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
  • 9,706
  • 17
  • 67
  • 117
1
2 3 4 5 6 7