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

The case for a marketing content hub

Transform your digital marketing to deliver customer expectations

Download now

Fast, flexible and compliant e-signatures for global businesses

Be at the forefront of digital transformation with electronic signatures

Download now

Why CEOS should care about the move to SAP S/4HANA

And how they can accelerate business value

Download now

IT faces new security challenges in the wake of COVID-19

Beat the crisis by learning how to secure your network

Download now
Advertisement
Advertisement

Most Popular

Visit/operating-systems/ios/355935/apple-confirms-serious-bugs-in-ios-135
iOS

Apple confirms serious bugs in iOS 13.5

4 Jun 2020
Visit/mobile/5g/355911/the-uk-pivots-to-japan-for-5g-equipment
5G

The UK looks to Japan and South Korea for 5G equipment

4 Jun 2020
Visit/security/ransomware/355945/new-ransomware-uses-java-to-target-software-organisations
ransomware

Tycoon ransomware discovered using Java image files to target software firms

5 Jun 2020