Microservices is an architecture that divides the big system become structured services that run separately and deployed independently. Those services communicate each other in a loosely couple relation. Each service can be in different server and has its own database. But in some cases, the services are located in the same server or even have one same database. However, the service function run and deployed separately.

It is different with Monolithic architecture, that all function is run by one big system and can’t deployed separately between functions. And the functions communicate in tight coupling. Consequently, it affects each other densely.
Simply, we can say that in Microservices architecture, we divide the big one system become several separate functions or app. And in Microservice architecture, an app is called as “service”. The diagram below gives brief overview how Microservices architecture works.

There are several types of how the services communicates each other. They are HTTP Communication, Message communication and Event-driven communication. We will talk about them later in different article.
What are the advantages of Microservices architecture?
- It is easier to scale up
- Because it is separated become smaller business unit and has it’s responsible to its own data. So, it is easier to design for scale up with minimum risk to affect other function
- It is easier to maintain
- In resolving problems and changing process, we can localize it in each service. The analysis and design can be focused a service
- It is easier to learn
- Learning the small chunks is easier than learn one big system
- Parallel development process
- Because of it is has loosely coupled relation, it is more possible to do development separately at the same time on different services
What are the disadvantages of Microservices architecture?
- High possibility of communication failure between services
- Since the services is separated, the communication can be more complex and has higher failure possibility
- It is more difficult to maintain a lot of services
- Of course, it requires extra effort to maintain numbers of services in different machine and database than only one
- More complicated testing over distributed environment
- The testing process might be more complicated, because each dependent service should be ensured works well
- More resources
- More services, more machine, more databases. It means that it requires more resources.




Tinggalkan komentar