Hi, Tien, 

Joo's email mentions part of the reason. On the other hand, the Provider should 
be started before the Consumer, so when the Consumer starts, the Provider has 
been bound to a fixed port and started. At this time, the Consumer is either 
directly connected to the Provider's port, or needs to get the Provider's ip 
and port from the Config server, and can no longer change and affect the 
Provider's metadata information. So the way you mentioned the Consumer to 
affect the Provider is not reasonable.
However, you realize that if the Consumer is not directly connected, but is 
addressed through the Config server, and only accesses the internal network 
without penetrating the firewall, then the Provider can actually be started 
with a random port, and then ip And the port is registered to the Config server 
because the Consumer does not actually care which IP and port.

At 2019-11-07 07:25:12, "Jason Joo" <[email protected]> wrote:
>Tien,
>
>Generally it's a server socket. So all connections to provider will use the 
>specific (listening) port on PROVIDER side but it may be a random one on 
>consumer side.
>This is the rule from TCP. Connections are recognized by 4-element on both 
>side: src:srcPort-dst:dstPort.
>
>best regards,
>
>Jason
>
>> On Nov 6, 2019, at 23:07, Tien Dat PHAN <[email protected]> wrote:
>> 
>> Dear experts, 
>> 
>> As we know, the protocol is open on a specific port if one set the 
>> "dubbo.protocol.port" parameter to a given port. 
>> In addition, we just wanted to know how Dubbo provides the connection from 
>> API consumer to the providers. Does it require extra ports to be open? If 
>> YES, how these ports are selected?
>> 
>> Best 
>> Tien Dat PHAN
>

Reply via email to