LearnBoost / up

Zero-downtime reloads and requests load balancer based on distribute.
540 stars 73 forks source link

Support for sticky routing or socket.io workers #22

Closed mbrevoort closed 12 years ago

mbrevoort commented 12 years ago

I added sticky worker support for xhr-polling, jsonp-polling, and htmlfile socket.io specific routes. The stickiness is based on the socket Id in the URL (sid % num_workers = worker_index).

I was going to just extend up and create a custom distribute routing handler but I really like the cli interface (bin/up) and would basically just end up forking it to copy over up-cli.

Oh, I also pegged the express version in the package.json because 3.0.0alpha1 was causing the tests to fail.

rauchg commented 12 years ago

Wow, mike, this is great work. I was going to do this myself soon!

mbrevoort commented 12 years ago

thanks :)

mbrevoort commented 12 years ago

FYI I'm starting to work through how well things recover when using multiple workers and redis-store when the workers are reloaded. There are definitely existing challenges there. I'll let you know how it goes.