Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There are many algorithms or methods for distributing the load between servers. Random or round-robin are simple approaches. More sophisticated algorithms consider runtime properties in the system like the machine's load or the number of pending requests. The distribution can also be controlled by application-specific requirements like sticky sessions. With a reasonably diverse set of users, simple approaches perform as well as complex ones.

In WSO2 Carbon-based products, cluster messages are used to identify a node that is joining or leaving the cluster.

Session affinity

Stateful applications inherently do not scale well. Therefore, architects minimize server-side state in order to gain better scalability. State replication induces huge a performance overheads overhead on the system. As a solution to the problem Instead of deploying stateful applications in clustersa cluster, you can use session-affinity-based load balancing can be used.

Session affinity ensures that, when a client sends a session ID, the load balancer forwards all requests containing a particular the session ID to the same backend worker node, irrespective of the specified load balancing algorithm. This may look like defeating the purpose of load balancing. But, before the Before the session is created, the request will be is dispatched to the worker node which that is next-in-line , and a session will be is established with that worker node.