Java programmers learn to share good route Dubbo architecture introduced

  Good programmers Java learning routes Share Dubbo architecture introduced in the face before we look at specific description of what is Dubbo

  Dubbo Alibaba in 2011 revenue distributed service framework, the framework is the core service of governance. Dubbo mainly provides three functions, remote interface calls, load balancing and fault tolerance, service registration and service discovery

At present, already the Apache open source project

Dubbo architecture


Details of the work instructions (from dubbo official website)

Role Description node (master)

Service provider Provider exposed services
Consumer remote service call service consumer
Registry service registration and registration center found
the number of calls Monitor statistical services and call center monitoring time of
Container service running container

Call relationship Description

1. The service container is responsible for starting, load, run service provider.
2. The service provider when you start, registration services they provided to the registry.
3. Consumer Services at startup, you need to subscribe to the service registry.
4. The registry returns a list of addresses service providers to consumers, if there is a change, the registry will change based on the long connection push data to the consumer.
5. service consumers, providers from the list of addresses, soft load balancing algorithm, choose a provider call, if the call fails, then select another call.
6. service consumers and providers, in memory of the cumulative number of calls and call time, time sent once per minute statistical data to the monitoring center.

Dubbo architecture has the following characteristics

Connectivity

· Registration and lookup registry responsible for the service address, the equivalent of directory services, service providers and consumers interact with only registry, the registry does not forward the request at startup, less pressure
-control center responsible for statistics the number of times each service call, call time, the statistics first time sent after the memory aggregated per minute to the monitoring center server, and to report to show
· service providers to register their services provided to the registry, and report the call time to the monitoring center, this time does not include network overhead
· consumer access to the service registry service provider address list, and call the provider directly from the load algorithms, time to call the monitoring center to report, this time includes network cost
-registry, service providers, service consumers of the three are long connection between the monitoring center except
· registration Center through a long connection to sense the presence of the service provider, the service provider is down, the registry will immediately push event notifications consumer
-  registry and all the monitoring center downtime, does not affect the already runs providers and consumers, consumers in this Cache provider list
· registry and the monitoring center are optional, serving consumers directly connected to the service provider

State of health

· Monitoring center shoot down does not affect the use, but the loss of part of the sampling data
· Database after the shoot down, still provide service registry list queries by caching, but you can not register the new service
-peer cluster registry, after Renyiyitai dawdle away, will automatically switch to another
post-shoot down all the registration centers, service providers and service consumers can still communicate through a local cache
stateless-service provider, after Renyiyitai shoot down does not affect the use
-all service providers after the shoot down, the service consumer applications will not be available, and unlimited reconnection waiting for service providers recovery

Flexibility

Registration Center for the peer cluster can be dynamically increased machine deployment instance, all clients will automatically discover the new registry
service provider stateless, can increase the dynamic deployment of machine instances, push the new registry service provider information to consumers

 


Guess you like

Origin blog.51cto.com/14479068/2439349