5 Comments

I was reading an exercise a few days ago about using WebSockets for a chat application and the need of persistent sticky connections.

Simply explained, Saurabh!

Expand full comment

Thank you Raul

Expand full comment

Hi Saurabh, I designed a system around 3-4 years ago where we had the APIs behind an LB.

Now for authentication we used JWT so we need not use Sticky session but we added SignalR for websocket and after that we had to enable the sticky session.

At that time I did not improve the system, still I'm not much aware of what alternative we can do.

I will look into this, but wanted to share that this is still a grey area for me, and may be for many more.

Expand full comment

Thanks for your thoughts Kapil.

This was exactly my view as well while writing this post. Sticky sessions are still grey areas for a lot of applications. Most of the time, people end up using them because that's how things were being done in the past.

But there are also valid cases. As I also touched upon in the post, WebSockets is one area where I've seen sticky sessions as the norm. I think that's the situation you also ran into. In my view, there is no harm in using sticky sessions if the use case demands it strongly.

Expand full comment

Hi Saurabh, It was a great article. While I was reading this, the question came to my mind, do we generally also have a backup distributed store for session information/ data availablity ? Or doesn't it depends on the requirements?

Expand full comment