Cloud Scalability – How Can it be Achieved?
In my previous blog, I discussed Microservice Architecture, which is one way that we can build scalable applications for the Cloud.
In this article, I’ll be discussing some of the services and features available in Cloud platforms, such as Microsoft Azure and Amazon Web Services (AWS), that allow you to scale Services and Resources.
One of the advantages of Cloud services is the ability to scale depending on demand. For Compute resources such as Virtual Machines (VMs), this can be achieved by scaling Up through Vertical Scaling, or Out through Horizontal Scaling. Vertical Scaling involves adding more resources, such as memory or processors to a virtual server, whereas Horizontal Scaling refers to the addition of nodes to a cluster of servers.
In practice, most people will use a combination of Vertical Scaling and Horizontal Scaling to balance their workload against resources.
⇑ Fig 1: Diagram demonstrating Vertical and Horizontal Scaling
Databases need to be scalable to ensure that they are available at all times. When a database has run out of storage, or cannot handle multiple requests, it is not scalable.
Horizontal and Vertical scaling can also be applied to databases, however, the type of scaling will depend to some extent on the type of database and its application.
Scaling works in the same way as described for Compute Resources previously, however with Horizontal Scaling, the data must be split between all the nodes in the cluster, which may not be suitable for a Relational Database Management System (RDBMS) where there are a lot of joins. NoSQL databases scale well using Horizontal scaling because they have no concept of foreign keys or normalisation.
While these methods of scaling allow us to increase or decrease capacity, it requires somebody to carry out Server Management and Capacity planning, which adds to the cost of running a Cloud service.
Serverless Computing is an abstraction that makes Servers, Infrastructure and Operating Systems invisible to the Developer, and allows billing based on how long your code is running, or the resources it is using at a given time.
Serverless Applications allow Developers to link together a number of fully-managed services which only run when an event is received. Common examples are:
- Web application architecture
- Internet of Things (IoT) back-end
- Software as a Service (SaaS) integration
- Mobile back-end
Cloud Architecture provides a number of different patterns that allow you to scale applications and services to cope with demand. Serverless Computing can reduce the cost of maintaining your Cloud Infrastructure, and is particularly useful in applications where you have unpredictable streams of data, to avoid paying for unused capacity.