Re:Running Rails on Heroku Update
by wmf on Sunday March 17, 2013 @03:01PM
(#5390519)
Why is a single app mapped to multiple routers? Why not just map it to one?
[ Parent
| on HN ]
Because you don't want to scale up just by adding more shards that consist of a single router. The distribution of the traffic to each shard isn't random, some applications are more popular than others. Additionally, you don't have any redundancy if a router goes down.
Then you would need another level of HTTP routers that would route to this application specific router. Also the router becomes a single point of failure and possibly a bottleneck: if a backend returns large responses, all of them go through this single router.
Or you could use DNS to map each app to its assigned router. (Of course, when I say "router" I mean at minimum a redundant active/passive pair.)