Hacker News new | ask | show | jobs
by bad_user 4584 days ago
AWS has a really interesting feature in their auto-scaling groups, coupled with their ELB (elastic load balancer). You can configure an auto-scaling group with a variable number of instances that ads or removes instances automatically, based on the ELB's measured latency or the number of requests coming in or many other such metrics.

This works out great and results in cost savings, as it can survive spikes, plus during the night the traffic is at most half or even less than the traffic you get during the day. I had a setup that was handling over 30,000 reqs/sec and during the night it kept about 6 h1.medium instances active, while during the day it could go upward to 20 instances, but was usually stable at around 14 instances.

This article mentions ELB, but I don't understand - does Google's Cloud Compute offer something similar? Can one vary the number of instances based on the incoming traffic or other metrics?

2 comments

Google's load balancer offering doesn't need to prewarmed was the main point. Its a fair point, having to prewarn ELBs isn't exactly fun, form takes about 10 minutes to fill out. If you're doing TV ads, lots of stuff is last minute. You can prewarm it yourself by throwing artificial traffic at it but you always risk just taking down the ELB if you ramp up to fast. Weird things happen to ELBs if you spike them with big bursts of traffic, one of service providers had 24 hour backlog of web hooks that they sent out all at once. It caused our ELB to fail all the instances even if we brought up new ones. Also during load you can get other sites to show up on your ELB. Had asp.net error page show up on ours. We run rails. Wish amazon would scale up ELBs instances based on the number instances you have behind it using the ratio calculated on past usage.
Google Compute added an ELB equivalent (the "GCLB"), but it doesn't have autoscaling built-in.

To get autoscaling, you can either roll your own — Google explains how here[0] —, or use a multicloud autoscaling solution (disclaimer: I work for such a provider).

[0]: https://cloud.google.com/resources/articles/auto-scaling-on-...

Thanks for the link. I wonder how well it works. Did you try implementing it?
Well, that's what our software does too, so I didn't really have an incentive to do so!

Now, judging from how busy the engineers are here, I'd say this is a bit harder than it seems!