You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "goto456 (via GitHub)" <gi...@apache.org> on 2025/08/07 06:53:15 UTC

[I] [Bug] Use Nacos as registry center, every diffrent registry.group eatablished it's own NamingService connection, that causes too many connections to be established [dubbo]

goto456 opened a new issue, #15624:
URL: https://github.com/apache/dubbo/issues/15624

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo Java 3.2.13, JDK 8, Mac OS/Linux
   
   ### Steps to reproduce this issue
   
   In one Dubbo project use Nacos as registry center, there are several interfaces, and set different `registry.group` for each interface, that will established one connection to Nacos for each interface(registry.group), so it causes too many connections to be established.
   
   I check the code in class `org.apache.dubbo.registry.nacos.NacosRegistryFactory`, in the method `createRegistry` will create a `NamingService` every time.
   
   ***Is it neccessary to create a new `NamingService` every time for each different `registry.group` ?***
   
   some related code:
   
   <img width="959" height="827" alt="Image" src="https://github.com/user-attachments/assets/4327cc98-b40c-4d34-8a70-7681109bcb95" />
   
   <img width="1146" height="661" alt="Image" src="https://github.com/user-attachments/assets/99afa722-4a87-44da-84bf-fd221a98d15c" />
   
   <img width="1211" height="706" alt="Image" src="https://github.com/user-attachments/assets/0655e8eb-bcd6-41cd-b7f6-04c42a13b93a" />
   
   ### What you expected to happen
   
   Establish only one NamingService Connection for each `Nacos Host`,not for each `registry.group`
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] Use Nacos as registry center, every diffrent registry.group eatablished it's own NamingService connection, that causes too many connections to be established [dubbo]

Posted by "goto456 (via GitHub)" <gi...@apache.org>.
goto456 commented on issue #15624:
URL: https://github.com/apache/dubbo/issues/15624#issuecomment-3177778297

   > how many groups do you have? how much less will the connections number be if share connection between different registry groups?
   
   There are 100+ groups in each consumer service. If it shares connection between different registry groups, it will decrease many connections.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] Use Nacos as registry center, every diffrent registry.group eatablished it's own NamingService connection, that causes too many connections to be established [dubbo]

Posted by "goto456 (via GitHub)" <gi...@apache.org>.
goto456 commented on issue #15624:
URL: https://github.com/apache/dubbo/issues/15624#issuecomment-3167523937

   > what's your dubbo.registry.register-mode? if you choose dubbo3 + nacos2.x, you'd better only use instance mode, or use zk as your registry center if you keep using interface mode.
   
   I used `instance` mode, dubbo 3.2.13 + nacos 2.1.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] Use Nacos as registry center, every diffrent registry.group eatablished it's own NamingService connection, that causes too many connections to be established [dubbo]

Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15624:
URL: https://github.com/apache/dubbo/issues/15624#issuecomment-3169614494

   how many groups do you have? how much less will the connections number be if share connection between different registry groups?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] Use Nacos as registry center, every diffrent registry.group eatablished it's own NamingService connection, that causes too many connections to be established [dubbo]

Posted by "RainYuY (via GitHub)" <gi...@apache.org>.
RainYuY commented on issue #15624:
URL: https://github.com/apache/dubbo/issues/15624#issuecomment-3695341659

   > > how many groups do you have? how much less will the connections number be if share connection between different registry groups?
   > 
   > There are 100+ groups in each consumer service. If it shares connection between different registry groups, it will decrease many connections.
   
   Could you provide me with the details of your scenarios? I don’t understand why the scenarios require configuring so many different groups for registry.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [I] [Bug] Use Nacos as registry center, every diffrent registry.group eatablished it's own NamingService connection, that causes too many connections to be established [dubbo]

Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on issue #15624:
URL: https://github.com/apache/dubbo/issues/15624#issuecomment-3163338139

   what's your dubbo.registry.register-mode?
   if you choose dubbo3 + nacos2.x, you'd better use instance mode, or use zk as your registry center if you keep using interface mode.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org