One of the hugest advantages that cloud environments provide is elasticity. This is thanks to the fact that it’s possible to run more servers when the app has more users or to stop them when traffic goes down. Also, it ensures the provision of an optimal service at the lowest cost. In addition, it allows giving service from several datacentres all around the world, ensuring high availability.
Most people think that just by setting a LAMP server on an EC2 Instance in AWS or on a virtual machine in Azure they have already migrated to the cloud and they can take advantage of it. Soon they realise that it isn’t true.
The benefits that this scenario can provide are almost non-existent. The power of the public cloud relies on the multiple services that providers put in place and the utilisation that our application makes of them.
At CAPSiDE, we’ve helped many clients migrating their apps to the cloud. We’ve been assessing their operation and advising on how adapting them to different services, to achieve the optimal performance and the maximum uptime at the lowest cost.
There are many points to take into account in order to be capable of carrying out a successful migration. But, we consider there are 4 core points that each web app on the cloud must fulfil to make the most of this kind of solutions.
4 core points to fulfil for your web app on the cloud
Do not work with local data
Elasticity implies the dynamic creation and destruction of machines/instances. Therefore, we have to keep in mind that the server data will be destroyed when stopping it. Our app has to be prepared for that eventuality. For instance, if our app allows users to upload files to be checked by the rest of users, we can’t place those files in a local directory of the server that is attending the query.
The different vendors provide solutions to allocate our files in order to let the different instances of our application access them or, when necessary, other services.
Do not use data in user session on the server
Session data is a useful information of each user that we can save on the server. Regularly, it’s necessary for the proper operation of a web app on the cloud. We’re in the same situation as in the previous point. In order to leverage elasticity, we need to stop depending on the environment where our app is running. So, we need a service that allows storing this information and accessing it in a fast way.
Use cache for the static content
Cache usage frees our web app on the cloud from managing petitions where content isn’t modified (e.g. a picture). If we add that this answer comes from different parts of the world, based on geographical situation, it improves speed and reduces resource consumption on our servers. But, the app has to be aware of this fact to be able to manage those petitions and to control when it has to update a content or not.
Deploy new functionalities without any service outage
The last point that, as we see it, a web app on the cloud must fulfil is deploying without service outage. Subsequently, testing in an identical environment to the production one and assuring, in case of issues, to roll the previous version back. We should do this in a transparent and fast way to the users.
Designing and building this kind of processes may seem complicated, as it requires a broad knowledge of both the infrastructure and the technology that each vendor uses. We’ll only be able to successfully deploy them if we establish automatized change control, deployment and infrastructure management systems.
In order to ease that, in CAPSiDE we’ve developed ENZiME. A tool that allows a visual deployment of app versions by recreating the whole production infrastructure. Only when we’d verified a correct behaviour, ENZiME allows the replacement of the old version without a service outage.
If you have in mind or you’re assessing a migration to the cloud, and you need someone to guide you through the whole process, do not hesitate to get in touch with us.