Live data from Hacker News

Heroku - Bamboo Routing Performance

blog.heroku.com

51–60 of 152 posts

Re: Heroku - Bamboo Routing Performance

#51
post #23

Earlier quoted context omitted.

I think this PR has already hurt Heroku & caused them to lose customers.

How many customers are running on a stack that old that are at the scale being complained about? It is probably cheaper to tell them to upgrade if they want better performance, or if they dont want to/ can't then they unfortunately can't be officially supported.

Cedar doesn't fix this for Rails. It helps marginally.

Re: Heroku - Bamboo Routing Performance

#52

I think this is really a fine response considering the pretty terrible way the original post was written and the community responded. The simulation was a bit of a stretch because the supposed number of servers you need to achieve "equivalent" performance is highly dependent on how slow your worst case performance is, and if your worst case isn't that bad the numbers look a lot better. Don't remember the precise math…

I am very interested in hearing the intricacies and gotchas this problem presents. Do you know where I can read up on this topic?

Re: Heroku - Bamboo Routing Performance

#54
post #47
post #40

Earlier quoted context omitted.

Atomic counters are pretty fast. Redis, for example, should be able to handle it without breaking a sweat: http://redis.io/topics/benchmarks

I doubt they want every inbound request to require: • query remote redis for lowest-connection-count dyno(s) (from among potentially hundreds): 1 network roundtrip • increment count at remote redis for chosen dyno: 1 network roundtrip (maybe can be coalesced with above?) • when connection ends, decrement count at remote redis for chosen dyno: 1 network roundtrip That's 2-3 extra roundtrips each inbound request, and n…

It would seem at first glance that the extra round trip(s) would be less costly than the potencial bottleneck by a large margin. As mentioned several times in the other thread, increasing average latency to narrow your latency histogram is almost always the correct choice.

Re: Heroku - Bamboo Routing Performance

#56
post #33

Can someone explain, to people who know nothing about scaling infrastructure, why routing to idle dynos is a hard problem?

It requires statefulness and decisionmaking at the routing layer, and that's another thing that adds overhead and can go wrong at scale. (For example, there may be no one place with knowledge of all in-process requests. Traffic surges may lead to an arbitrary growth of state in the routing layer, rather than at the dynos.) There are probably some simple techniques whereby dynos can themselves approximate the throughp…

I must be stupid, because surely it can't be that hard to partition the routing groups?

For example, use a hashing algorithm that switches to 1 of N intelligent routers based on domain name.

If you pick the right algo you can pretty much add routers whenever you like.

(It would be nice to know what Heroku have tried so far, at the very least to drive off know-it-all blowhards like me.)

Re: Heroku - Bamboo Routing Performance

#57
post #47
post #40

Earlier quoted context omitted.

Atomic counters are pretty fast. Redis, for example, should be able to handle it without breaking a sweat: http://redis.io/topics/benchmarks

I doubt they want every inbound request to require: • query remote redis for lowest-connection-count dyno(s) (from among potentially hundreds): 1 network roundtrip • increment count at remote redis for chosen dyno: 1 network roundtrip (maybe can be coalesced with above?) • when connection ends, decrement count at remote redis for chosen dyno: 1 network roundtrip That's 2-3 extra roundtrips each inbound request, and n…

Really? Is that so hard? All you need is a table on the router that tells it the best information it can currently have about the number of requests processed on each dyno - without doing a roundtrip. This requires exactly one additional (one-way) package: A message from the dyno to the router, telling it that it has finished the current request.

Now, to avoid dead dynos (because the finished message might have been lost somewhere) the dyno can repeat the finished message ever 30 seconds or so (and the router ignores messages with counts <= 0).

Re: Heroku - Bamboo Routing Performance

#58
post #41
post #25

Earlier quoted context omitted.

I'm not sure that should be a concern at the routing layer or even necessarily a concern of heroku. It's not their job to ensure that your code isn't blowing up. That being said, health checks are nice for other reasons and could be used outside of the routing layer (which you need to sail along as quickly as possible).

The problem with that is when your code is failing to run properly due to their hardware problem - now whose fault is it? I don't know how big they are. 50k machines? Could be off by an order of magnitude either way but I'll go with that. Suppose that your servers have, let's be generous, a 5 year mean time between failure. That's 10k machines dying every year. About 27 per day. A bit over 1 per hour. Machines don't…

I'm having trouble finding information about this. It's disturbing how little attention seems to be given to load balancing relative to how important it is.

Re: Heroku - Bamboo Routing Performance

#59
post #47
post #40

Earlier quoted context omitted.

Atomic counters are pretty fast. Redis, for example, should be able to handle it without breaking a sweat: http://redis.io/topics/benchmarks

I doubt they want every inbound request to require: • query remote redis for lowest-connection-count dyno(s) (from among potentially hundreds): 1 network roundtrip • increment count at remote redis for chosen dyno: 1 network roundtrip (maybe can be coalesced with above?) • when connection ends, decrement count at remote redis for chosen dyno: 1 network roundtrip That's 2-3 extra roundtrips each inbound request, and n…

This is NoSQL at startups in a nutshell. A master-slave vertical scaling database won't work when we're the size of twitter, so we're going to settle for a shoddy user experience while we customize the hell out of it. Heroku gets away from this with Postgres and hopefully they can get away from this with their load balancing too.
Post reply on HN