Selecting specific worker for connection

57 Views Asked by At

So, I'm using a hypnotoad server for my application and is trying to maintain state for connections. Turns out for every connection a different worker is spawned/selected. Can I somehow make this selection explicit? Also is there a way to know which worker was used for my last request and use it again for corresponding requests?

1

There are 1 best solutions below

1
On

You can ran multiple masters (every with one worker or like morbo - single processes).

And add load balancer before 'em which will be responsible to selection of concrete process per connection.

Typically I used nginx with upstream module sticky setting.