Author: Prachi KulkarniPosted On Feb 02, 2012 | 4 Mins Read
As outlined in earlier blog (Is your application a candidate for cloud migration), any application can be deployed on cloud, using right cloud application framework. However, in order to take maximum advantage of cloud features like dynamic scaling and high availability, it is advisable to make some design changes in the application. Here is a list of a few such design considerations:
- Use of Decoupled Components
- Asynchronous Communication
- Stateless Application Design
- Choice of Database
- Data Storage Strategy
I plan to discuss these design considerations in some detail, in the coming sections.
As in case of traditional designs, more modular the application design, more will be the scalability of the application in the cloud. The trick here is to make independent application modules in order to make distribution and in turn dynamic scaling of application easy. Some of the techniques used for such decoupling are as follows:
- Use of API interfaces or Web Service Interfaces for module integration and interaction
- Use of atomic transactions within the modules
- Avoiding direct data exchange between modules as far as possible. All module data should be derived from the database.
All the steps described further in this article also contribute in decoupling the modules.
In addition to use of API/web services, the application can have Message Based communication between its modules instead of procedure based tight coupling. This will function something similar to the asynchronous communication in standard workflow modules.
Stateless Application Design
Stateless application design enables distribution. As a part of this, session state needs to be stored outside the application or component, in the database.
Choice of Database
Almost all the available cloud platforms support a variety of databases. Various extensions offered by cloud application frameworks make using these databases easier. Now-a-days in addition to traditional RDBMS like SQL Server and MYSQL, there is support for NOSQL database like MongoDB. Distributed database are offered as a service in the cloud application frameworks. The application design may want to evaluate use of any such databases, to further support distribution.
Data Storage Strategy
As a strategy, consider keeping dynamic data closer to the compute and static data closer to the end-user. This translates to storing the data generated in the cloud, within the cloud and storing the static data on CDN, near the end user.
Further Guidelines for data and application deployment
- Use of Cloud Application Framework: There are various cloud application platforms that provide faster deployment as they work directly off the source code repository like GitHub. Development using the cloud application framework may also be easier and faster compared to that using Cloud Platform API
- Automatic Configuration Processes: Automated configuration of new machines to be added in the deployment environment is vital in order to enable dynamic scaling. Machine images as well as various scripts can be used for this.
- Shorter Deployment Cycles: This will keep the cloud version latest, offering new features often
- Agile Testing: The testing needs to be faster and modular for the cloud setup. This will save time in the functional and regression testing. Most cloud application frameworks offer choice of test driven development, which can be very helpful here.
- Decision about which part of the application to be moved on cloud: This decision can be critical for big enterprise applications, where moving everything to the Hybrid / Public cloud may not be possible due to various security policies as well as need of complete control on the module deployment and workflow. Following guidelines can be used here:
- Modules which are compute intensive and are needed for short bursts of time can be moved to the cloud
- Peripheral modules can be moved to the cloud
- Modules that may experience varying user load can be moved to the cloud
- Use of private cloud or deployment restricted to the private portion of hybrid cloud can be considered for critical modules
Other than this, there are various design considerations related to security and cloud type. We will look at these in detail in subsequent blogs.
Any application can go on cloud, even without any design changes. However, following these guidelines, it is possible to design horizontally scaling application and reap all the benefits of cloud deployment. We will look at the guidelines for selecting cloud provider in the next blog.