Monolithic vs Microservice Architecture
- Asad Naqvi
- Apr 4, 2019
- 3 min read
Updated: Jun 10, 2019
Microservices are a new and important software trend that has had a deep impact on delivering enterprise software by many firms across the globe. Microservices architecture represents a fundamental shift in how IT approaches software development, and one which has been successfully adopted by organizations like Netflix, Google, Amazon, and others. But what is a microservice vs monolithic architecture? First, let’s compare both these forms of software development.
What is a monolithic application?
Enterprise Applications are built in three parts: a database, a server side application and a client-side user interface. A monolithic application is built as a single unit. Traditional software development processes (waterfall, agile, etc) usually have larger teams working on a single, monolithic deployment. On the other hand, many startups begin with a monolithic structure because its design lends itself well to small teams and offers other advantages like less operational overhead. Also, monoliths often just have one massive code base. Server side application logic, front end client side logic, background jobs, etc, are all defined in the same code base. This means that if developers want to make any changes or updates, they need to build and deploy the entire stack all at once.
What is a microservice architecture?
By contrast, the central idea behind microservices is that some types of applications become easier to build and maintain when they are broken down into smaller pieces that work together. Each component is continuously developed and separately maintained, and the application is simply the sum of its constituent components. Each service encapsulates a core business capability that provides value to the enterprise. The same service can be reused in more than one business process or over different business channels or digital touch points, depending on need. By standardizing on contracts expressed through business-oriented APIs, consumers are not impacted by changes in the implementation of the service. This allows service owners to change the implementation and modify the systems of record or service compositions which may lie behind the interface and replace them without any downstream impact.

© Weaveworks, Inc
What pro’s/con’s do each architecture offer?
Generally speaking, monolithic applications are easier to debug and test when compared to their microservices counterparts. Once you start hopping across process, machine, and networking boundaries, you introduce many hundreds of new variables and opportunities for things to go wrong. The major advantage of the monolithic architecture is that most apps typically have a large number of cross-cutting concerns, such as logging, rate limiting, and security features such audit trails and DOS protection. When everything is running through the same app, it’s easy to hook up components to those cross-cutting concerns.
Microservice architectures are typically better organized, since each microservice has a very specific job, and is not concerned with the jobs of other components. Decoupled services are also easier to recompose and reconfigure to serve the purposes of different apps (for example, serving both the web clients and public API). They can also have performance advantages depending on how they’re organized because it’s possible to isolate hot services and scale them independent of the rest of the app.
Which one is right for my product?
The decision of monolithic vs microservice architecture for your product cannot be taken in isolation. It requires an extensive analysis
Complexity:
Defining each micro-service requires extensive analysis to determine the key business fundamentals that drive revenue and growth of the product.
Resources:
It is important for your development team to be familiar with the microservice architecture broker exposing them to a code base that has implications across the platform.
Product Strategy:
Defining your product growth strategy is a key component to consider before building choosing the correct architecture. How are we going to scale up in the future? What is our product differentiator?
Infrastructure:
Leveraging the best out of micro-services would require a sophisticated cloud based infrastructure that increases operational overhead and hosting costs.
References
https://medium.freecodecamp.org/monolith-vs-microservices-which-architecture-is-right-for-your-team-bb840319d531
https://hackernoon.com/should-i-go-for-microservices-or-a-monolithic-application-28e9e2a47eae
Comments