Image credits to Pixabay at Pexels

What are microservices?

I was first introduced to microservices when I saw it on a job posting. That led to this quick dive into what exactly microservices are, and how they’re used in regards to software development.

Microservices is defined as “an architectural approach to building applications” (Red Hat). At the granular level, it is a “cloud native architectural approach in which a single application is composed of many loosely coupled and independently deployable smaller components, or services” (IBM).

Image Credits to Red Hat.

TechRepublic says that “in the past, applications were developed using monolithic architecture, meaning that all the dependencies, subroutines, libraries, and necessary snippets of code had to be built into the app directly. If any one of those elements goes bad, the entire application can come crashing to a halt”.

In short, microservices emerged as an approach to solving for performance and scalability. In order to minimize potential issues with the application, certain components were broken down to make managing and maintaining the app easier.

This approach of breaking services down in order for better maintenance is not new; OpenSource explains that

“there are other programming paradigms which address this same concept, such as Service Oriented Architecture (SOA). However, recent technology advances coupled with an increasing expectation of integrated “digital experiences” have given rise to a new breed of development tools and techniques used to meet the needs of modern business applications.”

Microservices are a popular approach because “development teams are able to rapidly build new components of apps to meet changing business needs” (Red Hat).

Some of the benefits that come along with microservices are:

  1. Scalability — “as demand for certain services grows, you can deploy across multiple servers, and infrastructures, to meet your needs” (Red Hat)
  2. Easy to deploy — “it no longer requires an act of Congress in order to change a line of code or add a new feature in application” (IBM)
  3. “Developer independence — small teams work in parallel and can iterate faster than large teams” (OpenSource)

Microservices is not the optimal approach for every team. Using microservices involves a number of challenges, including:

  1. Testing and debugging: both are necessary factors in development, but can be more challenging especially with many teams and features that are looking to be added.
  2. Security: Sudip Sengupta writes that as “microservices are often deployed in cloud-based environments”, this can lead to “increased risk and loss of control and visibility of application components”.
  3. Complexity: essentially “a lot more services, created by a lot more teams, deployed in a lot more places” (IBM).

Please feel free to give the below resources a read if you want to learn more about microservices and/or whether or not this is an approach you or your team might want to incorporate.

Software Engineer, writing about Full Stack and Frontend Web (and sometimes Mobile) Development | aimeeliang.com