Interview Series 23

(1) dubbo support different communication protocols

 

1) dubbo agreement

 

dubbo://192.168.0.1:20188

 

The default is to take dubbo protocol, a single long connection, the NIO asynchronous communication, based on the sequence agreement as hessian

 

The scenario is applicable: a small amount of data transfer (per request within 100kb), but the high concurrency

 

In order to support high-concurrency scenarios, usually service providers on several machines, but there are hundreds of service consumers, may call amounted to hundreds of millions of times a day! This time with a long connection is the most appropriate, with each service is to maintain a long consumers can be connected, it may total of 100 connections. Then NIO connected directly behind the length-based asynchronous communication, may support high concurrent requests.

 

Otherwise, if the request billion times each time a short connection, then the service provider will not carry.

 

And because taking a single long connection, the transmission data is too big, it will lead to lower concurrency. It is generally recommended amount of data transmitted is very small, high support concurrent access.

 

2) rmi protocol

 

Go java binary serialization, multiple short connection, for a similar number of consumers and providers for transferring files, usually with less

 

3) hessian protocol

 

Take hessian serialization protocol, a plurality of short connection for the number more than the number provided by the consumer for file transfer, with generally less

 

4) http protocol

 

Go json serialization

 

5)webservice

 

Text walk SOAP serialization

 

(2) dubbo support serialization protocol

 

Therefore, the actual dubbo various communication protocols to support hessian, java binary serialization, json, SOAP serialization more text serialization protocol. But hessian is the default serialization protocol.

Guess you like

Origin www.cnblogs.com/xiufengchen/p/11259204.html