Oliver Wolf
Published at 24.06.2016
As we all know, Microservices have some benefits. In summary: They encapsulate logic that belongs together, enforce the cohesion and fit perfectly into an agile development process since a well-designed Microservice architecture is able to mature over time without putting much effort on this. Another pro is that each service can be implemented with the best fitting technology. Because of the smaller service size it is much simpler to rewrite a service using a new technology once you recognized you’ve made a silly choice. See this blog post for a closer explanation of the benefits of microservices.
These benefits are dreamful for developers but once it comes to operation, it becomes a nightmare. Tons of small applications implemented in different programming languages, frameworks and last but not least each one uses a different database technology. So when you decide to go with Microservices make sure you can handle those challenges. Let’s have a closer look on how this can be done.
Table of Contents
DevOp is currently a strong and popular movement. I would summarize it like this: It refers to the principle of establishing cross functional teams which are responsible for design, development and operating of applications. This principle was promoted by amazon with their popular mantra “You build it, you run it”. So, in my opinion, the term DevOp refers to a team and a culture not to one single person.
Operating heterogeneous applications usually requires deep operational knowledge. When an organization puts the responsibility to operate applications into the same team that developed the applications this team probably will protest at first. Because they think that additional responsibilities cause more work and stress.
Cloud Foundry’s aim is to take the wind out of the sails of those protests. Using Cloud Foundry each developer can go to the Cloud Foundry marketplace and pick technologies he wants to use. A single command later, the developer has its own instance of the required database type, message queue etc. Once the databases and other “backing services” are in place, the apps itself can also be deployed and scaled with also a single command.
Cloud Foundry encourages a DevOps culture by enabling developers to deploy and run their own applications. They don’t have to talk to an operations department anymore which reduces wasteful work dramatically.
But what Cloud Foundry can’t do is to take a monolithic not- cloud ready application run them highly available and scale them when load increases. To make the best use of Cloud Foundry, the developer must consider a good design when building their applications.
To leverage Cloud Foundry and Microservice architectures, developers must not only care about programming, they must also care about designing the architecture. This knowledge must pre present in each DevOp team and in the best case every developer is able to join such discussions. Why? Simply because there isn’t one architecture that is the right one. With every architectural decision trade-offs are made and the more people discuss these trade-offs, the better it is and the less surprises will arise. When you establish a DevOp team for application development, maintenance and operation, make sure the following skills are present in that team:
There is no blog post about DevOp and Microservices without Docker. So let’s talk about Docker. Docker provides you an easy way to setup an environment and then take this environment and start it on any Linux machine. The point is, this is done using containers and not virtual machines. Containers starts much faster than virtual machines and has a much smaller footprint. Another thing that Docker allows you is to extend and share your containers very easy.
In contrast to Cloud Foundry Docker doesn’t provide you an orchestration of your Microservice architecture. This means you must take care that the right Docker container runs. To automate this there are other solution like Docker Swarm or Apache Mesos. Those infrastructures provide you more flexibility than Cloud Foundry but come with much more responsibility. There is no marketplace where you can get turn-key ready database setups with one command. Docker is an option for mature teams able to deal with more responsibilities.
FYI: Newer version of Cloud Foundry offers a simple way to also specify a Docker container that should be used to run your application.
A team with a DevOps mindset and knowledge should be able to tame even a larger Microservice architecture. Using Cloud Foundry and applying some basic principles will transform even skeptical developers into a high performance DevOps team.
© anynines GmbH 2024
Products & Services
© anynines GmbH 2024