Distributed principle Dubbo Frame Analysis

Dubbo is Alibaba open an excellent high-performance service framework, so that the application can realize output and input functions and services through the RPC performance, can  Spring Framework seamless integration.

edit

Remoting: network communication framework to achieve a sync-over-async and request-response  message mechanism .

RPC: a  remote procedure call abstraction supports load balancing, disaster recovery and clustering capabilities

Registry: Registration and directory service event service framework for publish and subscribe services

edit

Provider

Services exposed side called "service providers."

Consumer

Call the remote party service called "service consumer."

Registry

Service registration and discovery of a central directory service called "service registry."

Monitor

The number of calls and call statistics service time log service called "Service control center."

(1)  connectivity :

Find the registry responsible for registration and address of the service, the equivalent of directory services, service providers and consumers only when you start to interact with the registry, the registry does not forward the request, less stressful

Center is responsible for monitoring the number of statistics for each service call, the call time, first time statistics transmitted every minute in memory after the summary to the monitoring center server, and to report to show

Service provider registration service provided to its registry, and call time report to the monitoring center, this time does not include network overhead

Service consumers to obtain a service provider list of addresses to the registry, and call the provider directly from the load algorithms, time to call the monitoring center to report, this time includes the network overhead

Registry, service providers, service consumers between the three are long connection , except the monitoring center

Registration center by  a long connection to sense the presence of the service provider, the service provider is down, the registry will push consumers to immediately notify event

All registry and monitoring center downtime, does not affect the provider has been running and consumers, consumers in the local cache of the provider list

Registry and monitoring center are optional, serving consumers directly connected to the service provider

(2) state of health:

Monitoring center shoot down does not affect the use, but the loss of part of the sampling data

After the database dawdle away, we can still provide service registry list queries by caching, but you can not register the new service

Registry peer cluster, after Renyiyitai dang off, will automatically switch to another

After shoot down all the registry, service providers and service consumers can still communicate through a local cache

Service provider stateless , after Renyiyitai shoot down, does not affect

After all the service providers dawdle away, will not be able to use the service consumer applications, and unlimited reconnection waiting for service providers recovery

(3) Scalability:

Registration Center for the peer cluster can be dynamically increased machine deployment instance, all clients will automatically discover new registration center

Non-state service providers can dynamically increase the deployment of machine instances, push the new registry service provider information to consumers

Course Catalog

Guess you like

Origin blog.csdn.net/weixin_45017862/article/details/93748391