Building Cloud Native Applications
Author: Ryan J Baxter
The nature of my job forces me to build quick simple sample applications that are easy to understand and demonstrate a single concept. After all I am trying to enable developers, and making something overly complex generally turns developers off when they are trying to learn something new. However I often hear questions about how to build real world production grade applications that run in the cloud. This is something that is very hard to demonstrate simply because, lets face it, no production quality application has ever been considered simple to understand. However, I do think it is an important topic to address because if you are serious about building an application in the cloud you should understand how cloud applications are different from your everyday app that everyone is familiar with building.
In my opinion, the cloud was originally marketed to developers as “the same thing you have today but a vendor is taking care of the infrastructure”. In some ways this is true, take any cloud vendor that allows you to request a VM from them. It feels just like the VM you had running in your own data center for the most part. The only difference is that its NOT IN YOUR DATA CENTER. The fact that it is not running in your datacenter is exactly the reason why cloud applications need to be architected differently. The lack of absolute control and predicability of the cloud is what makes it necessary to think differently when running applications in the cloud. Everything from the hardware to the networking is all someone elses responsibility, and you can’t even get that person on the phone if you think something is wrong. On top of that, if you are serving millions upon millions of people every day (i.e. Netflix, Amazon, Google) by the time your realize something is wrong it is too late, you have already lost a huge chunk of money.
So at the end of the day if you are serious about building and running an application in the cloud you need to first understand that you should not be building a cloud application like it is running in your own data center. You need to build it with every intention of it running in a very volatile place where much of what lies underneath your application is completely our of your control. A term has recently emerged for applications that have built to be run in the cloud, we refer to them as “cloud native applications”. So what makes an application a cloud native application? In Matt Stine’s book “Migrating To Cloud-Native Application Architectures” he describes cloud native applications as having the following characteristics
- Is a 12-factor application
- Follows a microservices architecture
- Uses self-service agile infrastructure – AKA a Platform-as-a-service
- Uses API-based collaboration
- Is antifragile
Lets look at each of these in more detail.