Questions tagged [sticky-sessions]

Sticky Sessions are a load-balancing method where individual user-sessions are kept to a single back-end server for the life of the session, and sessions are load-balanced across the whole pool. When one back-end server dies, only those user-sessions are interrupted.

Filter by
Sorted by
Tagged with
1 vote
0 answers
11 views

Nginx - Session persistency over two chained Nginx Instances

I have a very special use case - and I'm wondering if there isn't a better solution. Use case: Several users should be able to reach one of about 1000 target instances (C1 to C1000) coming from an ...
user avatar
0 votes
0 answers
16 views

Load Balancer with stickyness and in-order delivery when scaling down

I wonder what would happen if, say, we use an HAProxy Load Balancer with persistence (sticky sessions) and a server goes down (or we want to scale down). According to their docs: When doing ...
user avatar
0 votes
1 answer
245 views

How to clear 'sticky' HAProxy sessions?

So, originally my haproxy.cfg looks like this (snippet): frontend https_in mode http option httplog option forwardfor bind 192.168.150.2:443 ssl crt /etc/haproxy/ssl_cert/...
user avatar
  • 4,868
0 votes
0 answers
22 views

Remove sticky session setup with clustered database - sync delay duplication?

I am currently trying to remove my server setup with "Sticky Sessions" and go over to a setup with a Database for the session storage. Instead of one database (single point of failure) we ...
user avatar
  • 1
1 vote
0 answers
192 views

HAProxy 2.0 - retrying some of the requests based on URL

I have HAProxy version 2.0.14 installed, and I'm looking for a peculiar use-case which I haven't yet managed to configure correctly. Basically I have a frontend which listens on a port, and two ...
user avatar
0 votes
1 answer
299 views

Frontend still keep connected when backends RDP session is disconnected

I am using HAProxy to load-balance RDP connections between clients and RD Gateway server. There are two RD Gateway servers(192.168.0.10/192.168.0.5) behind HAProxy, the balance method is ROUND_ROBIN, ...
user avatar
  • 103
0 votes
0 answers
429 views

HAProxy using URL parameters for selecting a server

We have a mobile game client running on websocket connections and we want to use HAProxy as a load balancer. There are two main conditions: Set sticky session based on url parameter ID (varying ...
user avatar
0 votes
1 answer
359 views

How to include sticky session in AWS Elastic Beanstalk using Cloud Formation template

As I searched for the stickiness in Elastic Beanstalk I didn't find the way how to include it using AWS Cloud Formation. Can anyone help me to do that thing. Thanks in advance.
user avatar
0 votes
0 answers
154 views

HAProxy balancing on header while hiding it from the backend

I'm trying to set up HAProxy such that it picks a backend based on a header value. But I also want to hide that header from backends. My config: defaults mode http timeout connect 5s timeout ...
user avatar
  • 3
3 votes
1 answer
824 views

Achieving stickiness on kubernetes cluster with ingress-gce

I'm trying to achieve stickiness on kubernetes cluster but I am redirected to a different pod every time I access the load balancer. I have session affinity set to 'ClientIP' and also tried with '...
user avatar
1 vote
0 answers
1k views

Azure Application Gateway CookieBasedAffinity not sending sessions to same host

We have deployed 2 Linux VMs in a Backend Pool behind an Application Gateway. Our application on the 2 Linux VMs requires that the session remain on the same backend server, but we are seeing a ...
user avatar
0 votes
0 answers
1k views

How to preserve cookie in HAProxy?

We currently have a the following setup: [Client] -> [haproxy] -> [Nginx] -> [App Servers] Nginx currently sets the cookie affinity to the app servers by setting a cookie i.e: public-client....
user avatar
0 votes
0 answers
2k views

Apache mod_proxy sticky session not working occasionally

We are having four Tomcats load balanced with Apache mod_proxy (mod_ajp). mod_proxy is configured as follow, lbmethod=byrequests and sticky_session enabled. But occasionally we have noticed that ...
user avatar
  • 51
0 votes
0 answers
305 views

HAProxy appsession sends 5% of sessions to wrong backend server

Please consider this HAProxy configuration with sticky sessions using JSESSIONID defaults timeout server 5m frontend http-in bind *:80 default_backend servers backend servers option ...
user avatar
2 votes
0 answers
296 views

List current HAProxy appsession keys

Please consider this HAProxy configuration with sticky sessions using JSESSIONID defaults timeout server 5m frontend http-in bind *:80 default_backend servers backend servers option ...
user avatar
1 vote
1 answer
2k views

How to use sticky sessions with TCP ports in AWS?

I have an application that runs across multiple AWS instances, and I need to have them load balanced with sticky sessions. AWS load balancing works fine for HTTP, but AWS doesn't give you the option ...
user avatar
1 vote
0 answers
5k views

AWS Load Balancer does not forward Cookies

I have an AWS "Classic Load Balancer" that relays the traffic and for 3 EC2 instances. On these EC2 instances (it's simple Linux machines) I have a GlassFish 4.1 running and listening to port 80. ...
user avatar
0 votes
1 answer
986 views

Does any varnish using directors.hash() and hash.backend() always choose the same backend?

I have 2 varnish, each of them having 2 backends (same varnish versions -v4.x- and configuration file). Incoming client connections are randomly distributed to any available varnish. I need clients ...
user avatar
  • 2,826
4 votes
1 answer
7k views

Nginx ip_hash does not load-balance connections to meteor backend

I cannot get nginx to load balance internal connections with ip_hash enabled. I need sticky sessions as I use meteor in the backend with sockets but all requests always hit the same backend. The ...
user avatar
13 votes
2 answers
49k views

Sticky sessions with Nginx proxy

I have an application that's running on two different AWS instances and I'd like to enable "sticky" or "persistent" sessions based on IP so that I can take advantage of web socket technologies in a ...
user avatar
  • 331
0 votes
1 answer
143 views

Query on Apache load balancer balancer-manager and also on JSESSIONID/Stickysessions

I am setting up Apache with mod_proxy and balancer-manager, and just have two questions on this. 1 Is there any way to color code the status in the balancer-manager? EG green for OK, blue for ...
user avatar
0 votes
1 answer
53 views

Adding a server in another location

Background: I have built a typical website which let's users upload photos and videos (nothing too large, mind). Currently, I host this website on a single DigitalOcean droplet (Nginx, PHP, MySQL, ...
user avatar
  • 101
1 vote
0 answers
542 views

haproxy sticky sessions with 1 backend but multiple ACLs

I have two subdomains "www.example.com" and "something.example.com" but in the haproxy config they use the same backend, which has the same cookie settings. if I stay on one I can verify by the cookie ...
user avatar
1 vote
0 answers
541 views

nginx SSL termination with sticky load balancing

I want to use Nginx with a socket.io app with TLS/SSL termination at the load balancer. Is it possible to use the ip_hash directive to do sticky loadbalancing in combination with TLS/SSL termination? ...
user avatar
  • 31
0 votes
1 answer
3k views

How to config nginx as sticky loadbalancer for both http and https

I have the config below. However, when user switch from http to https, the session doesn't stick no more. Eg. homepage http but payment page is https. How do I solve this? upstream backend { ...
user avatar
0 votes
0 answers
2k views

Adding CSRF token in to Cookies of Post request in Haproxy

My post request to UAA is missing CSRF value i.e. X-Uaa-Csrf=2QytIy. This is required for login in to cloud foundry UAA. This is problem is because of internet domain name /private domain name mapping ...
user avatar
0 votes
0 answers
6k views

Load balancer F5 and sticky session

I have installed a web application on a clustered environment where the load is balanced by an F5 device. Unfortunately I do not know exactly its model, but hopefully this information is not necessary ...
user avatar
1 vote
1 answer
2k views

Haproxy 1.5x reload configuration without terminating layer 7 sessions?

Folks, I moved one of our SaaS applications off a coyote point hardware load balancer onto a vm running nginx + haproxy with haproxy handling hash persistence. The problem I'm running into is the ...
user avatar
  • 168
1 vote
1 answer
856 views

PHP sessions without an expiration period. What happens to the sticky session on the load balancer?

I'm using PHP sessions without an expiration period, using Amazon EC2 Elastic Load Balancing with Sticky Sessions.. What happens to the generated application sticky session on the load balancer? When ...
user avatar
1 vote
0 answers
1k views

NginX hits only one backend with ip_hash enabled...?

Setup that we're trying to evaluate is pretty straightforward - NginX on one machine (currently 1vCPU, 2GB RAM), two back-end Tomcats on two separate machines. Core configuration as follows: ...
user avatar
  • 121
0 votes
0 answers
592 views

JBoss EAP 6.3 - SSO and Sticky Sessions not working

We have a cluster with 2 nodes (JBoss EAP 6.3 with Single Sign On enabled), node 1 and node 2 in different servers. On top of that we have an Apache2 and are using mod_cluster for load balancing and ...
user avatar
  • 11
0 votes
1 answer
898 views

Losing session data when switching web servers on Azure web farm with 2 web servers. How can I share the keys with each server?

Losing session data when switching web servers on Azure web farm with 2 web servers. How can I share the keys with each server? Our websites were working flawlessly to be exaggerative when they were ...
user avatar
2 votes
0 answers
1k views

Sticky sessions with Apache load balancer for Socket.io 1.0

I've been messing around with Apache as a load balancer for my Socket.io server. I went through the following topic and now everything seems to be fine. Configuring Apache 2.4 mod_proxy_wstunnel for ...
user avatar
  • 21
3 votes
2 answers
43k views

Implementing TCP Sticky Sessions With HAProxy to Handle SSL Pass-through Traffic

How can we implement session stickiness in HAProxy when SSL must terminate on the backend servers? We need the stickiness because backends cannot share sessions. This is my original configuration: # ...
user avatar
1 vote
1 answer
5k views

org.apache.catalina.session.ManagerBase- Start expire sessions StandardManager and End expire sessions StandardManager

I am just a beginner with tomcat and got stuck with following error while deploying a third party application. I have certainly start getting in tomcat (tomcat version is 7 on windows 2008 r2) logs ...
user avatar
  • 21
0 votes
2 answers
1k views

HAproxy current session is zero

I have some problems on sticky sessions with HAproxy. Haproxy counts every request as a new session. I have a Java servlet that creates the cookie JSESSIONID. If I refresh that page 5 times. The ...
user avatar
  • 1
2 votes
1 answer
3k views

Haproxy sticky session not redirecting to different server when backend fails

I have the following configuration for my haproxy LB: global daemon maxconn 2048 # SSL ca-base /etc/ssl/certs crt-base /etc/ssl/private ssl-default-bind-ciphers ALL:!aNULL:!...
user avatar
  • 325
3 votes
1 answer
11k views

AWS ELB session stickiness issue when multiple AWSELB cookies exist in a single request

I have two web apps - App-A & App-B - running in 2 EC2 instances (both web apps are running in both instances) fronted with an AWS ELB. The session stickiness is enabled using 'Application ...
user avatar
  • 131
5 votes
2 answers
29k views

HAProxy with SSL and sticky sessions

We're trying to set up HAProxy (v1.5.1) to use SSL. While we managed to do that, we're having some issues with the round robin settings: We do want to have stick sessions, but haproxy seems to send ...
user avatar
  • 151
2 votes
1 answer
1k views

How to make Nginx fire 504 immediately if server is not available?

I have Nginx set up as a load balancer with cookie-based stickiness. The logic is: If the cookie is NOT there, use round-robbing to choose a server from cluster. If the cookie is there, go to the ...
user avatar
0 votes
1 answer
416 views

Session clustering with Jetty-runner 8.1.14.v20131031

I'm using Jetty-runner 8.1.14.v20131031 and I would like to know what's the easiest way to achieve session clustering between multiples running instances.
user avatar
  • 327
1 vote
2 answers
3k views

Apache httpd creates new sessions every time (2.2.16 and 2.4.6)

I have a server running Apahce httpd 2.2.16 on Debian 6.0.7 I use the proxy balancer directive to reverse proxy traffic using ajp protocol to tomcat backends <Proxy balancer://tomcatapp-cluster&...
user avatar
3 votes
3 answers
4k views

JBoss7 load balancing with mod_proxy_balancer - session not working

I am trying to set up mod_proxy_balancer for routing requests to 2 jboss7-servers. For the time being I am testing this setup on my local machine, using following config in httpd.conf: ProxyRequests ...
user avatar
  • 51
1 vote
1 answer
766 views

Loadbalance UDP traffic with session affinity and way to take servers in & out of rotation [closed]

What is the best way to go about load balancing UDP traffic among a whole bunch of servers, while keeping session affinity based on the users' IP? I need to also be able to take servers in and out of ...
user avatar
  • 85
0 votes
0 answers
183 views

Is it possible to have a minimum session time for HAPRoxy sticky sessions

We have HAProxy 1.4 successfully performing sticky session routing based on a value in the request querystring with the following configuration command. balance url_param userId This works great and ...
user avatar
1 vote
0 answers
434 views

Any way to route MSMQ messages based on label?

I have a system with one MSMQ sender (generates about 10k messages/sec) and one MSMQ receiver (2k messages/sec). Generating and sending messages is fast, reading and processing is slow. Hence I want ...
user avatar
  • 256
1 vote
1 answer
10k views

WARNING: Context manager doesn't exist

I have cluster setup with session replication. I have one load balancer with 2 tomcat instances as the worker nodes. In one of the node I am getting the WARNING. NOt sure what it really means. Session ...
user avatar
  • 89
0 votes
1 answer
146 views

Loadbalancer passing client IP to the web server (HTTPS)

Can a loadbalacer (reverse proxy) configured with sticky sessions pass on the client IP to the Web servers if the session is SSL encrypted without doing SSL termination? Is it even possible to have ...
user avatar
0 votes
1 answer
3k views

Load balance https and websockets wth sticky sessions and NGINX

I'm using NGINX to do sticky session load balancing in front of a node.js app that will support http, ssl, and websockets. If I want the load balancer to simply forward requests to the node.js server ...
user avatar
9 votes
1 answer
9k views

Using URL parameters for load balancing with HAProxy

I have a system which is load balancing via a cookie, but I want to use a URL parameter as an alternative. (Specifically, I have a front end app which does not support cookies). My setup is a little ...
user avatar