sofastack / sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
https://www.sofastack.tech/sofa-rpc/docs/Home
Apache License 2.0
3.82k stars 1.17k forks source link

Add DomainRegistry to support direct url #1206

Closed OrezzerO closed 2 years ago

OrezzerO commented 2 years ago

Motivation:

When we set domain as a directurl, the ip behind the domain will not change, even if the actual ip changed.

Modification:

Add DomainRegistry to check if the ip behind the domain changes. If so , it will notify address holder the latest ip address.

codecov[bot] commented 2 years ago

Codecov Report

Merging #1206 (0b02afa) into master (e05233e) will increase coverage by 0.40%. The diff coverage is 91.83%.

@@             Coverage Diff              @@
##             master    #1206      +/-   ##
============================================
+ Coverage     71.58%   71.98%   +0.40%     
+ Complexity      830      780      -50     
============================================
  Files           408      410       +2     
  Lines         17224    17365     +141     
  Branches       2684     2701      +17     
============================================
+ Hits          12329    12501     +172     
+ Misses         3530     3482      -48     
- Partials       1365     1382      +17     
Impacted Files Coverage Δ
.../java/com/alipay/sofa/rpc/common/RpcConstants.java 100.00% <ø> (ø)
.../sofa/rpc/registry/local/DomainRegistryHelper.java 62.50% <62.50%> (ø)
...y/sofa/rpc/bootstrap/DefaultConsumerBootstrap.java 36.17% <71.42%> (+13.21%) :arrow_up:
...alipay/sofa/rpc/registry/local/DomainRegistry.java 94.11% <94.11%> (ø)
.../java/com/alipay/sofa/rpc/client/ProviderInfo.java 76.85% <100.00%> (+2.78%) :arrow_up:
...ofa/rpc/message/bolt/BoltFutureInvokeCallback.java 71.69% <0.00%> (-7.55%) :arrow_down:
...n/java/com/alipay/sofa/rpc/common/SofaConfigs.java 84.90% <0.00%> (-1.89%) :arrow_down:
.../com/alipay/sofa/rpc/context/RpcInvokeContext.java 81.48% <0.00%> (-0.93%) :arrow_down:
...lipay/sofa/rpc/message/AbstractResponseFuture.java 56.14% <0.00%> (-0.88%) :arrow_down:
...ay/sofa/rpc/client/AllConnectConnectionHolder.java 60.51% <0.00%> (-0.26%) :arrow_down:
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e05233e...0b02afa. Read the comment docs.