DEV Community

loading...
Cover image for Monolithic VS Microservice Architecture

Monolithic VS Microservice Architecture

jonasjason profile image Jonas Jason ・2 min read

The web is changing... as it always does. But this time, I will tell you how microservices are contributing to that change. To begin, we should first know what the old standard of monolithic architecture actually is. I found this helpful introduction on whatis:

Monolithic architecture is the traditional unified model for the design of a software program. Monolithic, in this context, means composed all in one piece. According to the Cambridge dictionary, the adjective monolithic also means both too large and unable to be changed.

-- According to Ivy Wingmore

Let's focus on that last sentence about being unable to be changed. In the case of software projects, this isn't actually the case. However, it does indicate the difficulty of which implementing change can be. Any change to one component has the capability of breaking the entire system.

Microservices

Microservice architecture is an architectural style that structures an application as a collection of microservices where communication between microservices is often performed using API calls.

This image serves as an excellent example:
mediamore microservices
-- Sahiti Kappagantula

Mediamore is an entertainment company, using different microservices to power their app. They break it down into these services:

  • most liked
  • user info
  • video uploading
  • most trending
  • content
  • recommendations

and many more that aren't featured in this graphic.

Making Changes

Each microservice is likely maintained by its very own team (being a larger company). If the team working on video recommendations makes a change to their service, it only affects that one service. In terms of reliability, this means that a breaking change would only break the video recommendations. Users would still be able to browse videos, upload, comment, and everything else they'd normally do.

While microservices certainly are flexible and resilient, the more you have the tougher it can get to manage all of them.

This can definitely get a little convoluted if the microservices are obnoxiously fragmented or illogically compartmentalized. In a hilariously overexaggerated example:

Summary:

Microservices are the new gold standard. They are more reliable and easier to change than typical monolithic projects. However, they aren't necessary in every case. Be sure to think about whether or not they're right for your project.

I made a video walking you through deploying a Node.js To-do app on Docker. I also elaborate a little further on microservice architecture. Be sure to check it out:

Discussion (0)

Forem Open with the Forem app