Cloud Native Applications
Cloud Native Applications are a class of applications which are architected to fully make take advantage of a cloud’s capabilities like Scalability etc.
Why do we need Cloud Native applications?
Before taking a look at cloud native applications, let us assume that a traditionally architected application has been deployed on a cloud infrastructure. Since the infrastructure is provided by cloud, the infrastructure is smart. i.e., the infrastructure is elastic, (it can scale up or down), the infrastructure is resilient (if a virtual machine goes down, the cloud platform would guarantee that it is brought back online). However, the question is, whether the application is smart enough to run on cloud?
For an application to effectively run on the cloud, we can pose the following questions to ourselves:
- Can we scale the application horizontally? If we have multiple instances of the application, will it continue to function normally?
- Can we scale independent modules of the application?
- Is the application writing anything to local file system? If yes, then if we have multiple instances of the application, then it will create issues, since changes made to the local file system, remain local to that instance and will cause inconsistency. Also, if an instance goes down, the file system changes are lost.
- Is the application maintaining session locally? If yes, then if we have multiple instances of the application, then it will create issues, since the local session will not be available to other instances and if an instance goes down, the session information is lost.
- Is the application resilient to instances going down? The cloud infrastructure will bring up the instance very quickly; however, what will be the impact on the applications?
There are a few aspects or attributes which are required for an application to effectively utilize all the advantages or features that a cloud platform provides. An application which does this is known as 'Cloud Native'.
Following are a few features of Cloud native applications. Notice that, most of these correspond and answer to the questions posted above:
Characteristics of a cloud native application:
Following are the characteristics of a cloud native application:
- Could be scaled horizontally, without affecting the functional behavior of the application.
- Allows independent modules of the application to be scaled, thereby making best utilization of the resources.
- Does not write to a local file system. If there is any such use case, it would write to an object storage system, which is distributed in nature and could be accessed by all instances.
- Does not maintain a local session. Instead, it uses a distributed cache to persist session, so that, all instances could access the same session data.
- Is resilient to instances going down and will be as stateless as possible, so that new instances could be added or existing instances removed without affecting any functionality.
12 factor Applications:
A set of principles known as '12 factor application principles' is popularly used in designing Cloud Native applications. 12 factor application principles could be found here: 12 factor