Containers and Microservices

So you’ve made a decision that cloud computing is for you – great, but how do you make the best use of a resource where you can expect to be billed for your usage without spending money on infrastructure ticking over waiting for your next user to come along?

Or perhaps you have a pain point in making sure your developers are creating code which will run the same in production as it does in their development environments and are looking for a way to make the two behave the same?

Maybe you have a large and complex system, with many discrete inter-connecting parts and you are interested in how you make your deployment and release pipeline more streamlined and you want to target a continuous release solution but with your existing architecture the size and risk of releases is too great?

These are just some of the situations which often lead people to consider a move to Containers and/or Microservices.

Containers are like miniature self-contained Virtual Machines (or cloud instances) which encapsulate all the dependencies and configuration in order to run your code, but leverage technologies such as LXC, OpenVZ and Linux-VServer to partition a running system. This allows each partition, or Container, to have its own set of software installed, and run its own code independently from the rest of the system and other Containers. Its a neat solution to running smaller, more agile parts of your application as it doesn’t suffer the overheads involved with creating and managing an entire Virtual Machine or Cloud Instance to run each copy of the code.

By far the most common and talked about containerisation technology in use today is Docker, and many cloud providers have already brought out a containerised cloud solution allowing you to run your docker services in the cloud without having to maintain your own cloud infrastructure beneath them.

Microservices partner well with Containers. Since the overheads of using a Container to run your microservice are much lower than firing up a full VM or Cloud Instance, it can be much more responsive to scale in response to increased load. Microservices are best designed to do a single thing very well – they should be self-contained, they should fail gracefully when dependent services are unavailable, they should have well-defined APIs and they should be stateless and atomic.

PaaS Cloud solutions (such as AWS Lambda and API Gateway services, RedHat’s OpenShift and so on) are an interesting alternative solution to running microservices in Cloud Computing architectures.

If you’re embarking on a containerised and/or microservices journey, why not let us know what you’re project is all about and how we could help.