What is a microservices architecture?

This software development method focuses on flexibility - but how does it work?

Processor architecture

Microservices architecture is a form of application infrastructure that splits an app’s functions into distinct, self-contained components, which are then combined to achieve the desired outcome.

To best explain this approach, let’s take an example of an application designed to control a device’s on and off state using an SMS message. In traditional application development, every aspect of the app’s functions would be coded as part of a single codebase.

Related Resource

Deliver secure automated multicloud for containers with Red Hat and Juniper

Learn how to get started with the multicloud enabler from Red Hat and Juniper

Download now

Under a microservices architecture, the three main functions of the app would be split into three separate microservices: one that’s designed to receive SMS messages and process them, one designed to interpret the content of messages, and another designed to take this interpretation and initiate a command of on or off.

Advertisement - Article continues below

The advantage of microservices architecture is that the individual components are independent of each other, meaning they can be deployed separately. They can also be swapped out for another if needed without having to recode the application. For example, if you decide you would like the app to trigger based on a tweet rather than a text.

This flexibility is typically not possible with traditional monolithic applications, where a change in function would require the entire app stack to be modified and redeployed – like baking a cake and trying to change an ingredient once it’s finished.

How do microservices work?

Microservices architectures are almost universally deployed in conjunction with containers. Much like microservices themselves, containers are small, self-contained packages that hold the minimum amount of libraries needed to execute their particular function, operating independently of the other containers around it.

Advertisement
Advertisement - Article continues below

Because they're built to be small, easily modifiable and self-contained, containers are the perfect way to host microservices, but you'll need an orchestration layer to manage all of the containers within your environment. Kubernetes has established itself as the tool of choice within most organisations, but a multitude of options are available.

Advertisement - Article continues below

While microservices exist and run independently of the rest of an application, they still need to communicate with other services within the application in order for the application to carry out its intended function. This is achieved by APIs, which allow different microservices to communicate and pass instructions between each other. HTTP and REST are commonly used for this task.

Related Resource

Deliver secure automated multicloud for containers with Red Hat and Juniper

Learn how to get started with the multicloud enabler from Red Hat and Juniper

Download now

Benefits of microservices

We've already highlighted some of the advantages of microservices architectures, but there are a number of reasons why they've become so popular. Stability is a key one; not only are components easy to swap out when they need to be modified or replaced, but the failure of one microservice may not even have a noticeable impact on the application's performance. This will depend on the function being performed by the microservice, of course, but the failure of a non-essential component in a microservices architecture will often break a specific function, rather than the application as a whole. This also makes it easy to identify issues in the processing chain.

Advertisement - Article continues below

Adopting this kind of architecture can also have benefits for the speed of development, too. Because functions within a microservices architecture are not interdependent, different teams with an IT organisation can be working on different microservices within the application at the same time. This means bug fixes and new features can be added faster, which is one of the reasons why DevOps and microservices often go hand in hand.

Containers are re-usable, too. If you have two applications that require the same function to be performed, you can create one microservice to do it and copy it across both applications. Another benefit is the fact that, because they're self-contained, microservices can be coded in any programming language.

Featured Resources

Key considerations for implementing secure telework at scale

Identifying the security risks and advanced requirements of a remote workforce

Download now

The State of Salesforce 2020

Your guide to getting the most from Salesforce

Download now

Fast, flexible and compliant e-signatures for global businesses

Be at the forefront of digital transformation with electronic signatures

Download now

Rethink your cybersecurity strategy for the new world

5 steps to secure the enterprise and be fit for a flexible future

Download now
Advertisement
Advertisement

Most Popular

How to find RAM speed, size and type
Laptops

How to find RAM speed, size and type

3 Aug 2020
How to use Chromecast without Wi-Fi
Mobile

How to use Chromecast without Wi-Fi

4 Aug 2020
UN report points to a 350% rise in phishing websites at start of 2020
phishing

UN report points to a 350% rise in phishing websites at start of 2020

7 Aug 2020