Monolithic Architecture
Technical Definition
“Monolithic application has single code base with multiple modules. Modules are divided as either for business features or technical features. It has single build system which build entire application and/or dependency. It also has single executable or deployable binary” –

Benefits
- Simple mental model for developers, One unit of access for coding, building, deploying and technology stack.
- Simple scaling model for operations, just run multiple copies behind a load balancer
Difficulties with monolithic application, when it grow
- Large monolithic code base makes complicated to understand, especially for new developer
- Overloaded IDE, Large code base makes IDE slow, build time increase.
- Scaling become challenging, It doesn’t scale with the data volume out-of-the-box
- Continuously integration / deployment become complex and time-consuming.
- Deployment frequency is limited,
- Re-deploying means halting the whole system
- Re-deployments will fail and increase the perceived risk of deployment
- Extremely difficult to change technology or language or framework because everything is tightly coupled and depend up on each other.
Why Microservices?
- Relatively small, easy to understand and maintain
- Can be deployed, scaled independently of other microservices
- Rollback is easy, wont bring down everything.
- Dev teams can be small and productive, can be using different technologies
Micro Service Architecture
The Micro Service architectural approach to developing a single application as a small services, each services running in its own process and communicating with lightweight REST API Endpoint which may be written in different programming languages and use different data storage technologies.
These services are built around business capabilities and easier to apply Continuous Integration / Continuous Deployment by fully automated machinery
Micro Service architectures are defined by a Martin Fowler ,
“ functional system decomposition into manageable and independently deployable components ”
My point of view,
“ Micro Services is the architectural evolution of SOA, driven by DevOps practices ”
SOA systems also focus on functional decomposition, Services are not required to be self-contained deployable unit.

Privilege with Micro Service architecture, when it grow
- Each Micro Service is small and focused on a specific feature / business requirement
- Micro Service can be developed independently by small team of developers (normally 5 to 9 developers).
- Codebase is maintainable for developers – it fits into their brain
- Tools work fast – building, testing, refactoring code takes seconds
- Service startup only takes seconds
- Micro Service is loosely coupled, means services are independent, in terms of development and deployment both.
- Micro Service can be developed using different programming language.
Drawbacks / Issues ( Challenging…)
- Micro Service is not ultimate solution for every application but it’s surely solution for large enterprise application.
- Automated Testing complex because of distributed system testing is more difficult.
- Multiple services requires careful coordination between the teams
- Complex to tracking distributed system for centralized logging, Metrics, Health check, Audit, Exception and security become challenging.
- Each service has its own database. Maintaining data consistency between services is a challenge because 2 phase-commit/distributed transactions is not an option for many applications
- operational complexity of deploying and managing of many different micro service, Scaling application instances with NxM services instances
Micro Services Scaling Cube
The traditional method of scaling is running multiple copies of an application instances into load-balanced across servers is the X-axis.

The general approach of Micro Services falls along the Y-axis. Y-axis scaling breaks the application into its functional decomposition service.
The Z-axis takes a similar approach to the X-axis—running identical copies of code across multiple servers.
Z-axis scaling approach is based on routing criteria. You might route requests based on the primary key of the data being accessed or based on customer type sending paying or premium customers to servers with more bandwidth and capacity to deliver better performance.
In Monolithic Architectural Y axis scaling is out of box, monolithic you scale the complete “Application” even if it’s not required of specific module withing the application.
Advantage of Micro Service easier to scale the specific services of your application when ever needed.
Micro Services Concerns

In the diagram above, we can see a list with the most common challenges on Micro Service concerns.
To address many of these new challenges will achieve using Java spring framework with Spring Cloud and Netflix OSS libraries provides tools for Java developers to quickly build some of the common patterns in distributed systems such as configuration management (Spring Cloud Config) , service discovery (Netflix Eureka) , Ribbon (for load balancing), Service Security (Spring Cloud OAuth2) , Hystrix (fault tolerant and circuit breaker patterns), ELK-stack (Elasticsearch, Logstash and Kibana) for tracing libraries, etc. We will see the details in Next blog post.