apache/dubbo

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

Open

#15.624 aberto em 7 de ago. de 2025

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)Java (26.453 forks)batch import
help wantedtype/enhancement

Métricas do repositório

Stars
 (41.524 stars)
Métricas de merge de PR
 (Mesclagem média 7d 14h) (20 fundiu PRs em 30d)

Description

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues 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:

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?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Guia do colaborador