Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session affinity for HTTP load balancing on Google Cloud

Google Cloud has sticky sessions for network load balancing, but how to enable stickiness for HTTP load balancing. Just can not find...

like image 642
Art Avatar asked Sep 04 '15 10:09

Art


People also ask

What is session affinity in a load balancer?

Session affinity, also known as “sticky sessions”, is the function of the load balancer that directs subsequent requests from each unique session to the same Dgraph in the load balancer pool.

Which type of Cloud load balancers offer session affinity?

External TCP Proxy Load Balancing supports Session Affinity and offers client IP affinity, which forwards all requests from the same client IP address to the same backend.

What is session in load balancing?

Session stickiness, a.k.a., session persistence, is a process in which a load balancer creates an affinity between a client and a specific network server for the duration of a session, (i.e., the time a specific IP spends on a website).

How does Google handle load balancing?

Google's global load balancer knows where the clients are located and directs packets to the closest web service, providing low latency to users while using a single virtual IP (VIP). Using a single VIP means we can increase the time to live (TTL) of our DNS records, which further reduces latency.


3 Answers

Now the feature of sticky session is extended to Google Cloud HTTP(S) Load balancer. We can have session affinity either by Client IP or Client Cookie. For more information please refer this documentation.

like image 95
Nitin Kumar Singh Avatar answered Oct 09 '22 04:10

Nitin Kumar Singh


This feature has been released, but is currently in alpha phase.

Client IP affinity

Note: Generated cookie affinity seems like a much better option. Solves two of the issues related to IP affinity, as mentioned in the link.

like image 21
cfl Avatar answered Oct 09 '22 04:10

cfl


Well, unfortunately session affinity is only available for Network load balancing. Just left a feature request at: https://code.google.com/p/google-compute-engine/issues/detail?id=240&thanks=240&ts=1442238732.

Please, vote!

like image 1
Art Avatar answered Oct 09 '22 03:10

Art