Horizontal Scale User Session

In horizontal scaling, we need to synchronise the user session between multiple web servers.

to do so we can implement a Stateful Web Architecture or Stateless Web Architecture

Stateless Web Architecture is recommended for less overhead and scalability

So the architecture could look something like this

Pasted image 20220928230803.png

In which we're using NoSQL to store the session data (we can also use Memcached/Redis or SQL as well). In here NoSQL is choosen because it's easy to scale