Architecting an application has always been a challenge for the very fact that any mistakes done at this level can have catastrophic effects on the whole application. Several applications/products have gone through lot of rework, re-engineering and in some cases have been sunset purely because of the short comings in its architecture.
Cloud computing all together provides a different dimension of designing, developing and deploying your applications. Along with this comes lot more challenges for an Architect to make the right decisions that can help them build a solid scalable architecture.
While there are several aspects involved in architecting a solution, in this article we will focus on the “Scalability” aspect. We will look at how each of the layers in an application can be designed for scalability and how cloud computing can be leveraged to achieve the same. We will also touch upon performance aspects wherever it is required.
One of the biggest advantages offered by cloud computing is the scalability factor. In a traditional model architects used to spend considerable amount of time in designing scale-up and scale-out solutions. This is also due to the fact that significant investments are being made on the hardware platform and hence, they want to be absolutely sure that the investment stands good for the coming years.
Let’s look at each of the layers and how cloud computing can help you achieve this factor
Cloud Computing simply takes off this overhead from the Architect/Organization by providing on-demand (elastic) computing resources on the fly. The role of the architect now is to determine the right cloud vendor who can offer the level of scalability expected by the product. Cloud computing resources are available in different units like Extra Small, Small, Medium, Large, Extra large there by providing high level of flexibility to upgrade or add any number of units. Some of the cloud vendors provide Auto Scalability feature which allows you to even set a threshold value, and once the value is crossed new hardware is provisioned and the application instance is automatically launched on the new hardware. For example: Amazon platform provides Cloud Watch and Azure provides Azure Watch – for Auto Scalability. The Architects will now have to focus only on the scalability especially on the ability to scale out within the application code.
One important point to be considered in application scalability is the state maintenance of the application and more importantly to avoid usage of internal memory for any persistence. Hence, it becomes necessary to adopt a distributed caching mechanism for persisting any data that needs high performance and quicker access. Azure offers azure fabric cache and amazon offers elastic cache for achieving the same.
Majority of the leading cloud providers offer a no-sql database which offers unlimited scalability. If the application expects large volume of data it is better to opt for this as it moves the pain of designing and coding for scalability away from the developers. However, choosing a no-sql database has its own complexity in programming as it compels the developer to take care of querying, updating data as well as managing the relational consistencies. Hence, the architect has to weigh the need of scalability vs ease of programming to choose a solution.
The cloud providers also offer a flavor of RDBMS such as SQL Azure and Amazon RDS. In this case the architects/developers need to take care of data sharding/partitioning to achieve scalability. Cloud providers would eventually bring in the features to make this seamless like for example SQLAzure federation (once it is released) will take away the complexity of sharding from the developers. Till then the application architecture needs to handle this.
Data intensive and process intensive operations
Some of the cloud providers offer features to effectively compute data intensive processes for example elastic map reduce from Amazon offers the service to cost-effectively process large amount of data with higher performance. Azure for instance has separate role called worker roles which should be used to process long running jobs in asynchronous manner. The application architecture should identify data intensive and process intensive jobs and utilize such frameworks.
Static Content Delivery
Cloud providers provide content delivery network using which static content can be delivered from closest geo location. This can boost the performance of rendering media files, images and any static content. The providers take care of the availability of the contents by automatic replication across multiple geographic locations so that the content gets delivered from the closest geo location. Cloud Front and CDN are the technologies provided by Amazon and Azure respectively to support static content delivery.
Few more best practices,
- Design application to minimize bandwidth requirement both inbound and outbound for better performance and cost. For example, avoid chatty interfaces while exposing web services, use compression techniques to compress large pages.
- Group your instances so that they are collocated to achieve better performance and save cost. For example in azure you can provide the affinity group to keep your instances together
- Understand and analyze the limitations (if any) of the cloud provider before making your final decision. For ex: SQL Azure supports only 50GB per database. While this may not be a constraint for many applications it’s important for an architect to be aware of this information.
As you can see cloud computing has clearly brought out several advantages to the table. Cloud solutions is still evolving at a rapid pace and hence, it’s extremely important to keep a close tab on the upcoming technologies/features in cloud
Latest posts by Janakiraman Jayachandran (see all)
- Why enterprises should standardize Digital Application Management - July 17, 2017
- Top 10 Critical NFR for SaaS Applications – Part 2 - May 26, 2016
- Top 10 NFR in Software Architecture – Part 1 - April 29, 2016