dubbo + zookeeper basis

First, what dubbo that?

1) nature: a Jar package, a distributed framework ,, the framework of a distributed remote service call.

Since it is new to teaching, certainly a lot of students do not understand what is distributed and remote service call, why distributed, why long-distance calls. I simply draw a comparison chart illustrates (see Figure 2. Figure 1 drawing board painting, do not spray).

"Dubbo topic" dubbo is actually very simple, it is a framework for remote service invocation (1)


You think about the past or something in a server, invoke a method called direct naturally, nothing issue. Now, because of increased demand split up so many, deployed on a different server, it is not all on one server, and now the distributed, web service layer, layer calls before the service becomes a relatively remote call? That are a natural way to do how to call as before on the server? dubbo to resolve. This is below dubbo benefits.

Two, Dubbo benefits?

1. transparent remote method invocation, the same as calling a local method call remote methods, only a simple configuration, without any intrusion API.

2. Soft load balancing and fault tolerance mechanisms, including the network can replace F5 hardware load balancer, lower costs, reduce single point.

3. Auto Service registration and discovery, no longer need to write the dead service provider address, IP address registry based query interface name service provider, and can be smoothly add or remove services provider. (Explained below)

Spring arrangement with full Dubbo, transparent access applications, application no intrusion API, the configuration can be simply loaded with Spring Dubbo, Dubbo Spring-loaded extension Schema.

 

Three, dubbo architecture diagram below:

Prior to explain his architecture diagram, we first under universal concepts.

Node Role Description:

Provider (producer): Exposure services service provider.

Consumer (consumer): the service consumer calls the remote service.

As shown, we can simply be understood as web1234 need to call service1234 service, so web1234 consumers, service1234 producers.

"Dubbo topic" dubbo is actually very simple, it is a framework for remote service invocation (1)

If you call that producer services in accordance with the above, the consumer, it is not as shown below:

"Dubbo topic" dubbo is actually very simple, it is a framework for remote service invocation (1)

You do not look at Halo Halo? Halo does not Halo? Halo does not Halo? Anyway, I was dizzy, if it distributed a lot more? So we need him:

Registry (registry): Registry service registration and discovery. dubbo recommended that the zookeeper. What is the zookeeper? zookeeper consistency framework for distributed processing. You can view more of my previous articles: Let's just say, zookeeper is very simple, in fact, is a framework that is consistent with the treatment . Simply speaking, zookeeper is a mediation, sale of flats (producer) information on the real estate agency (registry) where, want to buy a property (consumers) to obtain a real estate agency where a list of resources. Thus, we become such Figure:

"Dubbo topic" dubbo is actually very simple, it is a framework for remote service invocation (1)

Is not it much better? Is not enough, we also need a monitoring center (of course, is why use of the monitor, and hung up the call fails how to do how to do???): Monitor: statistical services of call times to reconcile the monitoring center call time. (Not the drawing)

Then, Provider on the container operation, called Container service running container. (Not the drawing)

The final dubbo architecture, as shown in (from 0 began to read):

"Dubbo topic" dubbo is actually very simple, it is a framework for remote service invocation (1)

Own mind gone again according to the figure, the look they want and is not the same as described below.

0 service container is responsible for starting, load, run service provider.

1. Service Provider (producer) at startup, registration services provided to the registry.

2. Consumer Services at startup, you need to subscribe to the service registry.

3. The registry returns the 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.

4. Service consumer, provider address from the list, soft load balancing algorithm, choose a provider call, if the call fails, then select another call.

5. 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

Guess you like

Origin www.cnblogs.com/cgfpx/p/11520168.html