4 ms·
The pull model is very hard to implement because the router behaves like a proxy for a much larger set of dynos (think tens of thousands). When you have 10K cli
by dblock 14y ago
The pull model is very hard to implement because the router behaves like a proxy for a much larger set of dynos (think tens of thousands). When you have 10K clients yielding "i'm available" 10 times a second, you have a nightmare, it's not sustainable.
A possible solution for the proxy and the dynos to agree on a protocol where the proxy passes a request to the dyno and the latter can give up with a status code that says "retry with another dyno". This could go on to up to the 30s timeout limit that Heroku has now.
- jacques_chester 14y agoIn Mongrel2, app servers subscribe to a named ZeroMQ queue and, when they're done, they send the response on a different queue. You can actually configure an arbitrary number of different queues if you like, switching on request path and some other stuff I don't just now recall.