0
votes

In theory I understand how Microservices work and why they can be helpful in various cases but I still don´t get how it works in practice.

Let´s say there´s an online shop based on a CMS as a monolith application.

And there´s now the need to run the online shop in a MIcroservices architecture.

How would this Microservices architecture differ technically from the current, monolith, architecture?

For example, I pick out the productsearch.php. If i want to scale this function, normally I had to set up a new server and copy the whole CMS ressources folder to it for loadbalancing.

And with Microservices, productsearch.php would be a single Microservice I guess, and I would have to just copy this php file to scale without the need to copy other ressources?

2
Basically instead of one large application instance you would have many small application instances, each doing one specific job. So let's say in that one large application you identify that Operation A is a bottleneck and takes up most of the CPU time. Scaling out that entire application just for that one operation is wasteful. If Operation A is itself a small application instance, you can scale out just that one application. Put it behind a load balancer with a single endpoint, point the rest of the system to that endpoint, and you've more cheaply and easily addressed the problem. - David
having microservice does introduce headaches, such as shifting the point of failure to the infrastructure/network engineers should things go awry, Microservices are really dependant on how big/complex the software was designed in a monolith architecture fashion. It works for some, for others, may not work so well. In your case of example of mentioning a php script is very convoluted example, its much more than that, network, virtual machines, bandwidth, network architecture, etc - t0mm13b

2 Answers

0
votes

I have tried to explain it using this diagram of a fictitious CMS. With micro services architecture, we can independently scale each micro service. Each micro service may be developed by a different team, they may be even developed using different technology. But we great flexibility comes great maintenance overhead, I believe it is worth it as most of it can be automated.
Put simply, each module in a molithic application is a potential candidate for microservice. Howerver, microservices can be more granular than a traditional module.

enter image description here

This provides a good job at explaining how to decompose your monolithic application. http://microservices.io/patterns/decomposition/decompose-by-business-capability.html

0
votes

Technically and conceptually, a microservice is independent of other services (where in a monolith you'd have modules with inter-dependencies).

Technically, a microservice built on modern microservices platforms (such as Node.JS, Spring Boot or .NetCore) will be more easily able to take advantages of containerization systems (such as Docker), perhaps supported by service registry and configuration management technologies (such as Kubernetes, ZooKeeper, Eureka and so on).

The advantage of containerization is that it'll be easier to scale-out (add more containers). Going further, the whole microservice / containerization concepts, and related technologies, also help enable things like CI/CD.