Microservice with Java Spring Cloud
Definations of Microservice:
By Sam NewMan:- Small autonomous services that work together
By James :- Style is an approach to developing a single application as a suit of small services, each running in its own process and commuinicating with lightweight mechanism, often an HTTP resourece API , These services are build around business capabilities and independently deployable by fully automated deployment machinery, there is a bare minimum of centralized management of these services, which may be ritten in different programming languagees and use different data storage technologies
MICROSERVICES
- REST
- and Small well chosen deployable units
- and Cloud Enable
CHALANGEST WITH MICROSERVICE
1. Bounded Context
How to decided boundris of microservices id difficul
2. Configuration Management
Suppose we have 5 or 50 microservices, thse microservices have multiple instances in each environment and there are multiple environments
Let say we have 10 microservices, with 5 environment and let say 50 instances
so here we would need tons of configurations, and that would be huge work to do from the congifurations management side
3. Dynamic Scale Up and Scale Down:
in given below diagram you can see 3 diffrent microservices and there instances
and in given below microservice 1 required only 3 instances while microservice 2 needed 5 instances and microservice 3 needed only 1 instances
similary in future might be needed 10 instances for perticular one service or may be bring down older instances of microservices when they are not really needed
All this with dynamic load balancing
because when there is 3 instance of microservices one and there are 5 instances of microservices two
than we would want to distribute the load between all the instances of microservice 2 or supose 4 more microservices instances are coming up than we would need to ensuer all the new one also being use to the fullest extent : so for this we need the ability to dynamically bring in new instancesand also to disribute the load among the new instances
4. VISIBILITY: most importatant challange is visiblity
Suppose functionality is distributed into 4 microservices and we got bug in one of these
so how to identifie where is the bug is
you would need centralized log where we can go and find out the what happen for a specific request, which will tell us which microservice has a problem
it is not just find out the bugs we also have capablity to monitoring around these microservices
1. we also able to identified which microservice are down
2. We also able to identified server where there is not enough disc space all this kind of thing need to be automated so we need great visiblity into whats happening with these microservices
How to prevent one microservice down to imact the whole other micrso service to take down entire application , how to build fault tolerance into my microservices
Comments
Post a Comment