[tag subnets] add tag by subnets for near-rpc#216
Conversation
Codecov Report
@@ Coverage Diff @@
## master #216 +/- ##
============================================
+ Coverage 33.63% 33.83% +0.19%
- Complexity 497 505 +8
============================================
Files 154 156 +2
Lines 5280 5326 +46
Branches 655 662 +7
============================================
+ Hits 1776 1802 +26
- Misses 3306 3326 +20
Partials 198 198 see 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
|
||
| <properties> | ||
| <javax.ws.rs.version>2.1</javax.ws.rs.version> | ||
| <argline>-Dnetwork_interface_denylist=docker0</argline> |
There was a problem hiding this comment.
Why add this?
Thanks for your review , I will remove these redundant properties .
remove redundant properties.
| <dependency> | ||
| <groupId>org.testcontainers</groupId> | ||
| <artifactId>testcontainers</artifactId> | ||
| <scope>test</scope> |
There was a problem hiding this comment.
Is this dependency necessary?
like most of the extensions pom.xml , import org.junit.jupiter in testcontainers . can I import jupiter instead of testcontainers ?
There was a problem hiding this comment.
sure
ok , test depend on junit-jupiter-engine now .
| <version>1.0.2-SNAPSHOT</version> | ||
| <artifactId>dubbo-tag-subnets</artifactId> | ||
| <name>${project.artifactId}</name> | ||
| <description>The SOFARegistry module of Dubbo project</description> |
There was a problem hiding this comment.
Is this typo?
Others LGTM
sorry, I forget to change description, it's ok now .
What is the purpose of the change
fix issue: apache/dubbo#12763
most people depoy service in three zone for HA , we expect service rpc in same zone :
tag-subnets:
some company's service are in a big zone , we expect service rpc in same cell :
some company's service are in serveral city, we expect service prefer rpc in same zone , and rpc special service across zone( such as stock quantity service):
Brief changelog
ServiceConfig.java will add a tag by subnet, such as :
service on host 172.37.66.1 will add a dubbo.tag=cn|shanghai|a
and then service in cn-shanghai-a will rpc same zone
pull request tag support multi level dubbo#12673 will help to prefer rpc with long tag-level, for example:
consumer rpc tag=cn|shanghai|a
prefer1: service tag=cn|shanghai|a
prefer2: service tag=cn|shanghai
prefer3: service tag=cn
prefer4: service tag=""
Verifying this change
Checklist