Module 8 - Microservices
Last updated
Last updated
Microservices are an architectural approach to developing software applications as a collection of small, independent services that communicate with each other over a network.
Instead of building a monolithic application where all the functionality is tightly integrated into a single codebase, microservices break down the application into smaller, loosely coupled services.
Monolithic architecture is a software design approach where all components of an application are integrated into a single, indivisible unit.
In this architecture, the entire application, including the user interface, business logic, and data access layers, is developed, deployed, and maintained as a single entity.
Aspect
Microservices Architecture
Monolithic Architecture
Architecture Style
Decomposed into small, independent services.
Single, tightly integrated codebase.
Development Team Structure
Small, cross-functional teams for each microservice.
Larger, centralized development team.
Scalability
Independent scaling of individual services.
Scaling involves replicating the entire application.
Deployment
Independent deployment of services.
Whole application is deployed as a single unit.
Resource Utilization
Efficient use of resources as services can scale independently.
Resources allocated based on the overall application’s needs.
Development Speed
Faster development and deployment cycles.
Slower development and deployment due to the entire codebase.
Flexibility
Easier to adopt new technologies for specific services.
Limited flexibility due to a common technology stack.
Maintenance
Easier maintenance of smaller, focused codebases.
Maintenance can be complex for a large, monolithic codebase.
Testing
Independent testing of each microservice.
Comprehensive testing of the entire application.
Infrastructure Dependency
Less dependent on specific infrastructure choices.
Tied to specific infrastructure due to a shared codebase.
Containerizing Microservices with Docker
Containerizing microservices with Docker involves creating a Dockerfile containing instructions for building a Docker image.