Introducing Vertical Scaling - Make Your Workers Better, Faster and Stronger
Today we're introducing vertical scaling of workers, so you can get web and background workers with more resources. You can now get workers with two, three and four times the limits of a normal worker unit. We’ve tested this feature for the last couple of months with some large customers and the results have been great.
An application is scaled on the app’s subscription page. When you scale your workers vertically you’ll get better response times, request throughput, application stability and ultimately an improved user experience. Scaling vertically also allows you to deploy larger and more complex applications on AppHarbor.
Vertical scaling can do wonders for your apps, but we still want to encourage developers to design apps that are ready for horizontal scaling. The principles outlined in “The 12 Factor App” by Adam Wiggins are excellent guidelines to archive that (among other things), and if you haven’t read it already we strongly recommend it.
The impact of vertical scaling depends on how resource intensive the app is. Here is a screenshot from New Relic showing how appharbor.com performed after tripling each worker's resource allocation:
About 80-100ms (~40%) was cut of the average response time, and notice that the New Relic apdex score is greatly improved. In the meanwhile the request throughput was doubled. You can try for yourself, and see how vertical scaling makes your apps perform better.
Some scenarios where this feature is particularly useful:
- You've exhausted the resources of a single worker unit but can’t scale horizontally.
- You have already scaled out to multiple workers, and need to handle even more requests.
- You want to improve page load times.
- You have CPU/RAM intensive web or background workers.
- You need to scale more to more than 20 regular web or background workers.
- You application requires many concurrent connections and a higher request queue limit - for example for apps that extensively uses WebSocket and long-polling.
- Background workers - redundancy might not be as critical here and a single, large worker will often perform significantly better.
- Each of your background workers runs a large number of processes. With vertical scaling you get fewer, larger workers that can better run many processes.
Remember that all prices on AppHarbor are prorated and you only pay for the time you have a resource provisioned, not for the entire month - so you can scale your app vertically as well as horizontally cheaply and when you need it.
With today’s release we’re also changing the plans a little - the plans now include “worker units” rather than “workers”. This means that pricing remains the same, but you can use the worker units to scale both up and out. For instance if you’re on the Yacht plan, which includes 4 worker units, you can now scale to two workers with two worker units allocated for each - or 1 large worker with 4 worker units.
We’re very excited to make this feature available immediately. It’s a powerful and flexible addition to AppHarbor’s “scaling toolbox”. We welcome any and all feedback so we can continue to it improve it, and if you need help or advice on how to scale your app you’re more than welcome to reach out.
Now go scale those apps.