-
Notifications
You must be signed in to change notification settings - Fork 26.5k
NacosAggregateListener aggregates all instances into each service if dubbo-admin uses nacos as the registration center #15561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.3
Are you sure you want to change the base?
Conversation
…instances into each service. because every instances in NacosAggregateListener will be related to the URL of each service when build DubboServiceAddressURL from instance and DubboServiceAddressURL#getServiceInterface is realized as ## return consumerURL.getServiceInterface() ##
Run |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 3.3 #15561 +/- ##
============================================
- Coverage 61.00% 61.00% -0.01%
- Complexity 11495 11497 +2
============================================
Files 1909 1909
Lines 86777 86779 +2
Branches 13093 13093
============================================
- Hits 52942 52941 -1
- Misses 28416 28418 +2
- Partials 5419 5420 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
if |
The content you expressed is a little difficult to understand, i try to explain it based on my own understanding.
NacosAggregateListener aggregates instances to service instances map which grouped by service name.
The subscriber will be notified with all service info even just one service instance status is changed, e.g., so you want change the result of |
you'd better provide test comparison report to show the effectiveness of this PR. |
so the |
in our test env, we have 1500+ service ,and 2200 + instance info. Dubbo-admin need 4G to save the URL info .it need more in pro env,the dubbo-admin start very slow. |
i see. |
i doubt it's not only |
if the issue only existed in nacos, maybe the simplest way is using zk as your register center because it's difficult to determine this pr might affect existed applications or not. |
We have old services using old versions of dubbo (zk 3.4), springboot, and JDK, and some new services using higher versions of dubbo, Springboot, and JDK. So the solution we use is dual registration of zk and nacos, and all services will be registered with nacos. After all old services are upgraded, we can use the higher version of zk as a registration center, but this process will be longer. |
You are right. Directly modifying the ServiceAddress URL will have a wide impact. This problem is mainly caused by the dubbo-admin scenario and nacos' compatibility with the old service format. Do we have plans to remove nacos' support for the old service format? |
i don't know. As for me, you might customize these codes to meet your requirements. it's not easy to remove or modify any existed algorithm of community edition due to compatibility reason. |
This PR is limited to the admin protocol and will not affect other features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seemed that we should find a more elegant way to solve this problem.
What do you plan to do? In the dubbo-admin scenario, create a separate NacosAggregateListener object instance for each service? |
As for me, it might be better to customerize your dubbo-admin. By now, there are no plan to modify Dubbo for this scenario. |
in dubbo-admin case , NacosAggregateListener will aggregate all instances into each service. because every instances in NacosAggregateListener will be related to the consumerURL URL of each service when build DubboServiceAddressURL from instance and DubboServiceAddressURL#getServiceInterface is realized as ## return consumerURL.getServiceInterface() ##
What is the purpose of the change?
PR of the issue : #15267
Checklist