Microservice Architecture - Challenges

In the Micro Service Architecture world , We need to deal with more services in Enterprise level compared to current monolith world. We have the following basic challenges need to face in the Micro Service Architecture

Challenges in MSA:

 1) Service Management

 2) Data Management

Service Management :

We are dealing with more number of services in MSA world compared to our current world . Here I am going to explain the how to manage the services in terms of access/invoke in the MSA world. In the normal world , we are using the port/IP to access the services and also we maintains those values into Config/DB . Based on the env we will place the different values for those attributes since we are managing only few services.

Assume that we are managing 100 plus services in our environment , its more tedious work to manage those service's infra information like to PORT/IP and etc.  Here we will see how to handle those situation in MSA world

In our current world those services are SOAP/RESTful services and we can access those services through URL /WSDL based on the service implementation . In the MSA world always recommend to use/implement the RESTful services rather than SOAP Services. We already seen what are difference between the RESTful VS SOAP along with some scenarios for both .

Accessing any services , We need the URL/WSDL Mandatory , In our context we always use RESTful services so always access through URL. RESTful services access through HTTP with Json Type .

Let assume that we have 100 + RESTful services in our Enterprise which will serve for internal and external consumers like partners/providers/public and etc. Client will invoke those Server URL to access/perform those Operation from the Service.

Flow as follows

 Client Call -- Service/Client Discovery -- Service Registry 

Step 1: Service Registry

 Service Registry is nothing holding the Information about the location of service instances. It may be stored in the DB/File System . We need to register/de register our services into Registry before invoke those services. We have the frameworks are in the market to dealing the Service Registry . We choose the Eureka server for Service Registry along with Spring Boot/Cloud. We have the following ways to register our services in MSA world.

Netfleix Eureka is good example for Service Registry , will used to register/de register those services .

1) Self  Registry Pattern

2) Third Party Registry Pattern

In the Self Service Registry , Service Instance itself will register /de register themselves. Service Instance Heart beat request to prevent its registration from service expiring. Netflex OSS Service Client is good example for Self Registry Pattern . You can use the annotation to register the services in the eureka server(@EurekaServerClient)
Advantages of Self Service Registry :
Its very simple to implement and does not require any specific component to implement
Disadvantages :
Tightly coupled Service Instance with Service Registry ie each service instance couple with registry implementation

Third Party Registry Pattern ,Service Instance Register/De Register into the registry through third party framework ie Service instance is de coupled with Service Registry.Only implementation is complex .

Registrator and NetflexOSS Paron are the open source framework to use the third party registration

Service Discovery :

It mainly used to service instances have dynamically assigned network locations. Moreover, the set of service instances changes dynamically because of auto-scaling, failures, and upgrades. Consequently, your client code needs to use a more elaborate service discovery mechanism.

Types of Service Discovery

1) Client Side Discovery Pattern

2) Server Side Discovery Pattern





























































Comments