Load balancing and sessions

What is the best approach for load balancing on web servers? My services run in .NET and Mono, so they can be hosted in IIS or Apache2, and you will need to provide an SSL connection.

I read two basic approaches, saved state on a shared server and used sticky sessions, are there any others?

I read 3 different questions about sticky sessions:

1) the load balancer will know from which server you started the connection, and all further connections from this host will be redirected to the same server.

2) the load divider browses the cookie with the name: JSESSIONID

3) the load balancer reads a cookie with the name: ASPSESSIONID

I'm a little confused, what exactly will happen? Since the connections will be SSL, there is no way for load balancing to read cookies, and then what?

About storing real estate on a shared server, what solutions do you know? I read memcache - this is a good solution, but are there any others?

Greetings.

+6
state session load-balancing
source share
2 answers

When using SSL with a load balancer, distribute the SSL certificate on the load balancer and not on external servers. Thus, you only need 1 certificate on 1 server. The load balancer then talks to the back-end servers using simple HTTP. This obviously requires that your back-end servers are not directly accessible from the Internet.

So, if the load balancer is responsible for decrypting the request, he will also be able to check the request for jsessionid.

Important sessions work well with Apache as load balancers. You should check the Apache modules mod_proxy and mod_proxy_balancer .

+2
source share

In general, SSL load balancing means that the client is talking to the load balancer using the HTTPS protocol, and the load balancer is talking to the web server via HTTP.

Some load balancers are smart enough to establish an SSL session with a web server (so that it can read cookies) and maintain a separate SSL session with the client.

And some load balancers can maintain stickiness without using web server cookies. My load balancers can send their own cookies to the client (they also have many other stickiness settings).

+1
source share

All Articles