How I can add ip_hash?


#1

I want to scale multiple containers and I use websockets. Previously I set into nginx config manually method of load balancing. But there are too few settings for applications here.


#2

Hi there,

We don’t support sticky sessions on Enclave (either via ip_hash or other mechanisms).

Injecting this in your Nginx configuration wouldn’t do you much good anyway, since routing across instances happens at a different layer (an ELB or ALB sitting in front of the Nginx proxies). Besides, the entire concept of sticky sessions makes limited sense in a containerized environment where containers are frequently torn down and redeployed.

That being said, sticky sessions typically aren’t needed for websocket connections: a websocket connection runs over a single HTTP connection, so all messages in a given websocket connection will be routed to the same container.

Cheers,