Welcome back to Reasons to Deploy in the Cloud! In this series of posts, I'm going to discuss some reasons for choosing a cloud platform. Last time I went over three basic rules to saving money with cloud architecture. You've done the calculations, and cloud makes sense for your use-case from a cost perspective, now let's talk about the power and importance of scalability.
What is scaling?
A scalable cloud application utilizes the managed services of the Infrastructure as a Service (IaaS) platform to grow or shrink its resources based on demand. The simplest scalable architecture is a load-balancer marshaling requests to a bank of virtual servers. The load balancer can trigger an alert at various traffic thresholds and add or reduce the number of servers as needed. This design ensures that your app remains available and responsive no matter how much traffic your app is managing.
If your product goes viral, you may experience an unexpected swarm of visitors. Traditional deployments require more hardware, and people to configure and maintain infrastructure. While these assets are coming online your customers will experience delays, and slow sites cost you sales. Three months later when the buzz cools off, all that hardware goes on Craigslist for half the purchase price. Well-crafted cloud-aware applications scale automatically based on traffic and load with little to no delay, meaning happier customers and more repeat business.
How do you scale?
There are four considerations to app scalability.
- Make your components as small as possible – A modular design scales more efficiently. When each component can be moved to one or more separate resources, scaling will be smoother and faster. Many small servers are often cheaper than a few large ones.
- Use load testing to define smart scaling thresholds – Nothing will stress your app like real-world traffic. However, during design and development, simulation of the kinds of workloads your systems will be dealing with help guide the timing and scope of scaling rules.
- Leverage the infrastructure – Serverless architectures, sharded storage, dynamic clusters, automatic load-balancing and streaming services are scalable services offered by IaaS providers because they work. It is always easier to scale using these technologies than to re-invent them, if you can.
- Scale regionally – Many IaaS providers offer a global network of resources. When possible, build your app to be aware at a local level. There's no reason to spin up extra servers in Frankfurt when your traffic is closer to your Beijing data center.
Designing your app with these four guidelines in mind will help ensure smooth transitions between high and low-traffic times, and help keep your costs down during the life cycle of your product.
Stay tuned for more “Reasons to Deploy in the Cloud” posts! Next in the series we'll discuss some of the powerful management tools that cloud offerings give you to monitor and adapt to your end users' patterns.