Denise Yu breaks down the 12 Factors, and how they apply to applications running on Cloud Foundry and similar platforms
At Cloud Foundry Summit 2018 in Boston, Ed King from the Garden team and Jatin Naik from the Services Enablement team co-delivered an informative talk on how developers can transform their applications to run on cloud-based platforms, with the guidance of the Cloud Foundry Command Line Interface (CLI). In terms of current best practice, cloud-ready applications should comply with the 12-Factor standard, developed originally at Heroku.
Ed and Jatin’s talk broke down the 12 factors and how they apply to apps running on platforms like Cloud Foundry, which inspired me to draw this image outline of their talk:
After drawing this image, I realized it’d be helpful to provide a brief overview of the themes from their talk, which will help any team build stronger, more sustainable, cloud-native software.
Stateless applications and stateful services
Cloud Foundry strongly promotes the paradigm of deploying stateless applications. Previously, people might write web apps with business logic that depends on application state, or perhaps they would closely couple persistent data stores to their applications. In Cloud Foundry, the application layer where business logic lives should be stateless, so that new instances can horizontally scale easily in response to increased traffic. Additionally, by making data services easy to provision, bind, and update, Cloud Foundry makes this separation of concerns into a first-class concept.
Declarative dependency management
All languages come with dependency management toolkits, and these are a key part of ensuring that every application instance is built and deployed the same way each time. This provides confidence that staging and production environments are behaving in the same way at the business logic layer, which also allows for more effective debugging and troubleshooting when things go wrong. Idempotent operations are key to cloud-readiness!
Cattle, not Pets
Running at large scale is a key use case for Cloud Foundry. When working in large, distributed systems, there are lots of ways that things can go wrong: Cloud readiness means being prepared for unexpected behaviour in production. As a consequence, depending on particular application instances to survive incidents is not sustainable. Cloud Foundry promotes the notion of application instances as “cattle” — disposable, interchangeable units — rather than pets, so the workload as a whole can be prepared for anything.
Cloud Readiness
The key takeaway was that, while this talk specifically touched on .NET applications, transforming an application towards cloud readiness is possible for all applications, no matter how old they are or what language they’re written in. You can watch Ed and Jatin’s entire talk on YouTube.
For a cheat sheet on what the 12 factors are and how you can implement them, check out Ed and Jatin’s slides!
Change is the only constant, so individuals, institutions, and businesses must be Built to Adapt. At Pivotal, we believe change should be expected, embraced, and incorporated continuously through development and innovation, because good software is never finished.
Zero to Cloud in 12 Easy Steps was originally published in Built to Adapt on Medium, where people are continuing the conversation by highlighting and responding to this story.