Difference between Stickey and Affinity in Load Balancer
Stickey session means ensuring requests can be automatically routed to the same Real Server for handling as the initial request from the same source.
Different Vender have different machanism for identifing either through the use of an HTTP cookie or a CIDR netmask.
Affinity: this is when we use an information from a layer below the application layer to maintain a client request to a single server
Persistence: this is when we use Application layer information to stick a client to a single server
sticky session: a sticky session is a session maintained by persistence
The main advantage of the persistence over affinity is that it’s much more accurate, but sometimes, Persistence is not doable, so we must rely on affinity.
Using persistence, we mean that we’re 100% sure that a user will get redirected to a single server.
Using affinity, we mean that the user may be redirected to the same server