dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lexburner (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] lexburner opened pull request #3834: add a switch to control whether to prefer to register public address or site local address
Date Tue, 09 Apr 2019 06:58:11 GMT
## What is the purpose of the change

fix the issue: https://github.com/apache/incubator-dubbo/issues/3802
improve the existing changes: https://github.com/apache/incubator-dubbo/pull/3520

## Brief changelog

- add a switch `dubbo.prefer.public.address`.
- change the strategy to achieve IP address.

steps to achieve IP:

1. judge the switch `dubbo.prefer.public.address`
2. search from hosts mapping using `InetAddress.getLocalHost()`
3. search from the network cards using `NetworkInterface.getNetworkInterfaces()`
4. if the address achieved in 2 & 3 not match the `dubbo.prefer.public.address`, downgrade
to the reverse property of `dubbo.prefer.public.address`. In words, if no public address found,
downgrade to site-local address; if no site-local address found, downgrade to public address;
5. if no address found, using loopback address 127.0.0.1. 


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3834 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


Mime
View raw message