Micro Services discovery mode

Service Discovery role

There are three roles service discovery, service providers, service consumers and service intermediary.
Service Agent: bridge between service providers and service consumers.
Service Provider: the service address themselves to the service provided by the registered intermediary.
Service consumers: they want to find the address of the service from a service agency there and then enjoy this service.
Service Broker provides multiple services, each corresponding to multiple service providers.

 

Service model found

Currently, the service found primarily in two modes, mode client and server mode, the essential difference between them is that the client whether to save the service list information. FIG represented by the following two client mode and server mode.

Client Mode

In client mode, if you want to micro-service calls, first of all to the service registry periodically to get the list of services (client maintains that the service list), and then based on the local end of the call load balancing strategy, a service call.

Server mode

 

 


In server mode, the caller directly to the service registration center requests, service registries and through its own load balancing strategy, micro-service calls. In this mode, the caller does not need its own node in maintenance service discovery logic and service registration information, this model is relatively similar to the DNS mode.

 

Client mode and server mode

 

Distinction summary server mode and client mode

Client Mode: All clients need to maintain a list of information services, load balancing strategy and services at the end you do not need these additional mode of implementation.

Server model: the client must access each request intermediary services, access to the list of services, load balancing strategies are server-side implementation.

Under the server mode, easier access to multi-language, more versatile, but in client mode, it has a faster response time and greater disaster recovery capabilities.

 

refer:

https://blog.csdn.net/mr_seaturtle_/article/details/77618403

https://blog.csdn.net/shellquery/article/details/100892767

Guess you like

Origin www.cnblogs.com/-wenli/p/11965399.html