Microservice architecture is a method of software development to break down the application into small isolated functions which are called “services”. Services are meant to be developed and deployed independently and meet a unique business need.
In Microservices based architecture, a big application is built into smaller components and these components can talk to each other when required. These different smaller components can be called Interconnected services.
The main advantage of microservice based architecture is that, different components can be deployed independently, without re-deploying the entire application again for a small change. Many e-commerce and other high trafficked application companies are using microservices based architecture.
Pros of Microservices architecture
- Independent development
- Different tech stacks can be chosen that best suit the service.
- Small Targeted Teams
- Teams can be targeted to each service and make it easy to join a new member as there is no need to figure out what the entire monolith does.
- When a service goes down, the whole application does not stop functioning as it does with the monolithic.
- Independent scaling
- Services can be scaled independently optimizing costs because there is no need to scale the whole application.
- Data isolation
- Service can ideally have a private database. There may be services that do not need a database at all.
- Independent deployment
- Service can be updated without having to redeploy the entire application.
Cons of Microservices architecture
- As it is a distributed system, we should care about setting up all services and databases and then deploying them independently.
- Data Integrity
- Some business transactions, which require updating multiple business functions of the application, need to update multiple databases owned by different services.
- Having multiple independent services can make writing tests more complex, especially when there are many dependencies between services.
- Network latency
- Using many small services can result in increased communications between services. Also, if you have a chain of dependency between services to perform a business transaction, the additional latency that results in can become a problem.
- Different deployment environments!
- Microservices architecture
- Project Charter
- Laravel PHP commands
- AMI – Amazon Machine Image