Big words I know. First in order to determine the difference between the two let's define each one.
Monolithic
Monolithic architecture in the tech industry are services that are completed in a single unit. Each part of the program is contained within one unit. A great and common example of this is drupal. Within a drupal site, you have a theme, template reprocessing, views, entity APIs, fields API, and more all making up the CMS.
Amazon, Netflix, and Apple used to be a monolithic server but has since switched. The downside of having such a singular server was that amazon had to be sure the server capacity was able to handle all the traffic possible. This caused them to lose lots of money which no one wants. In addition, if a single part needed to be updated developers were required to rebuild and redeploy the entire server.
Having a Monolithic server would be like having all the lights in your house be in a series circuit. You wouldn't be able to turn on just your bedroom light and instead would have to turn on all the lights in the house. This would make your electric bill very high and waste a lot of money. Not only this but if one light bulb in your house goes out then you can't use any lights in your house! Now I am not trying to say one bug will always bring down an entire monolithic server but you get the picture.
Microservice
Microservices were built as the solution to the tedious and inefficient monolithic architecture.
A Microservice breaks down each component into a smaller set of independent components. Each component is in charge of carrying out whatever process they are in charge of as a separate service. This inherently means that each component has its own logic and functions. Each of these components is independently deployable and small. So to fix a bug or update a component developers no longer need to rebuild and deploy the entire server, just the part they are working on. Microservices allow the servers to scale to anticipated captities and limit themselves during downtime to save money.
So back to the house example. Instead, our house electric is made up of parallel circuits so that you can scale to capacity (turn on as many lights as you need) and fix one problem without updating the whole system (change one light bulb while the rest are still on).
I think this image does a great job of visually comparing the two.
Check out these articles I used to help understand these topics:
Why Netflix, Amazon, and Apple Care About Microservices
Top comments (1)
Very well put. Yea microservices architecture decouples very tightly coupled workloads. I was planning to write a post on monolithic vs microservices architecture anyways will refer for more insights. Thanks!!