Hi KimmKing, Thanks for your info, also thanks to Jason.
We are aware about the fact that the provider will start on a configured port. And clearly, there is no way the consumer side can affect the port opening on provider side. Our concern was only about the EXTRA port open, if needed, for the connection to be established. And as Jason has clearly pointed out, nothing extra is needed. FYI, the reason for this question (kinda dumb), is because we were having issues with RMI protocol before (random ports opening messing with firewall rules). Therefore, even though we learn that Dubbo default protocol using TCP connection, we just wanted to check with you experts to make sure we understand it right. And looks like this was a wrong speculation. Everything is COOL with Dubbo. Best regards Tien Dat On 2019/11/07 03:07:01, KimmKing <[email protected]> wrote: > 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 > > >
