I've enabled session affinity on Heroku via the CLI - is this enough to make sure traffic from a user hits the same process (Clustering using throng) on the correct dyno (multiple dynos)?
To be clear, I have no code to handle this. I just use socket io as is, I don't use sticky sessions or anything. All I've done is enable session affinity.
Is this enough? How can I test it locally?
Not sure if you ever got this answered but thinking through this problem myself. Could potentially be enough, however, Socket.io calls out:
Source
Given you're using the default long polling then ws connection order, I think Heroku sticky sessions should be able to route your initial long-poll request to the right dyno. The two things I am unclear on:
On number 2, it could potentially work via the long-polling API request p95 time being used to determine server load but unsure if API latency would increase due to websocket connections/workload.