dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

I am confused with config server, transporter config.

Open imsunv opened this issue 8 years ago • 7 comments

In my understanding. if we config transporter="netty4" in provider side. It will affect the consumer。 so we can use server="netty4" in provider side.

but why dubbo check sever key in DubboProtocol.initClient ? the consumer with low version (not support netty4) will start failed.

And the transporter key will not affect the consumer now.

imsunv avatar May 24 '18 06:05 imsunv

transport config will not override. the config that can override is like timeout, retries, loadbalance, actives and so on.

carryxyh avatar Jul 02 '18 13:07 carryxyh

@whanice

  1. if we config transporter="netty4" in provider side. It will affect the consumer。 Transporter is the protocolconfig attribute, the client does not have a protocolconfig concept, therefore the tranporter on the provider side will not be passed to the client.
  2. but why dubbo check sever key in DubboProtocol.initClient ? Because the value stored by the server will be passed to the client,therefore, the client will try to take the value of the server first.
  3. the consumer with low version (not support netty4) will start failed. I have tried neety4 as a provider, netty3 as a client, and can use it normally, can you provide demo for demonstration?

Thank you very much for your support of dubbo.

zonghaishang avatar Jul 05 '18 16:07 zonghaishang

Thanks for your guys reply. Surely. the tcp connection should not be related to the nio framework, No matter what you use, netty3, netty4 or mina in server. Will not affect the client use.

I care about migration. when consumer use dubbo-2.5.x . not have netty4 extension. when provider wants to upgrade dubbo verison to dubbo-2.6.x and use netty4. It will affect the consumer.

So I think in DubboProtol.initClient. change to this will be better.

 // client type setting.
    String str = url.getParameter(Constants.CLIENT_KEY, url.getParameter(Constants.TRANSPORTER_KEY, Constants.DEFAULT_REMOTING_CLIENT));

imsunv avatar Jul 06 '18 02:07 imsunv

And in the future. I think the sever key shoud not pass to consumer.

imsunv avatar Jul 06 '18 02:07 imsunv

You are right, I will confirm this question again.

zonghaishang avatar Jul 09 '18 05:07 zonghaishang

Through communication, we keep netty as the extension point name, there will be no problem

zonghaishang avatar Jul 10 '18 03:07 zonghaishang

And in the future. I think the sever key shoud not pass to consumer.

Agree, and this can be solved with #2030

chickenlj avatar Jul 10 '18 11:07 chickenlj