Questions tagged [sticky-session]

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

119 questions
308
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,929
  • 15
  • 52
  • 80
36
votes
2 answers

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
  • 4,114
  • 3
  • 23
  • 32
28
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…
14
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…
9
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
  • 687
  • 1
  • 8
  • 19
9
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,…
8
votes
1 answer

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
  • 10,295
  • 11
  • 80
  • 129
7
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
  • 231
  • 3
  • 10
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,584
  • 5
  • 34
  • 65
6
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
  • 335
  • 1
  • 3
  • 16
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
  • 2,441
  • 2
  • 14
  • 11
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,837
  • 14
  • 45
  • 68
4
votes
1 answer

How to set session affinity between inner servicess inside a Kubernetes cluster

Here is my problem: I have 3 services defined in a kubernetes yaml file: one front-end (website) one back-end : stateful, for user sessions one back-end : stateless I need session affinity on the stateful service, but not on the stateless nor…
4
votes
1 answer

Does the ws websocket server library requires sticky session when it is used behind a load balancer?

I am trying to setup websocket servers behind a load balancer. At first, I used the socket.io library. But I found that it requires sticky session when used behind a load balancer. According to this website, it sends multiple requests to perform…
userpal
  • 1,483
  • 2
  • 22
  • 38
3
votes
0 answers

what is the difference between consistent hashing and sticky sessions?

My understanding of consistent hashing is that it is used to minimize rehashing overhead and that request is served to the next nearest worker in the ring to the hash value of the request. So this guarantees same requests to hash to the same worker…
1
2 3 4 5 6 7 8