kimmking opened a new issue #2043: [Proposal]support hostname or domain in 
service discovery.
URL: https://github.com/apache/incubator-dubbo/issues/2043
 
 
   Hello, community,
           It's a nice way to support hostname or domain in service discovery, 
then we can gain more flexibility both developers and users.
   
   ## Problems
   in Dubbo, providers register their IP addresses to Registry Server like 
ZK/Redis etc. It will be difficult for these case: 
   - case A: When a provider deployed in a vm container such as Docker, 
consumers in  other computer can't access the IPs in container. 
   - case B: Across LANs(Local Area Network),consumer can't touch another IP  
in different LAN.
    
   ## Target
   solve problems to support case A & B
   
   ## Solution
   In case A and B, usually we map a proxy port from a remote IP or Container 
IP to a local IP out of network box.Then if dubbo support hostname or domain in 
service discovery directly, then we can modify /etc/hosts to redirect 
consumer's requests to the proxy port to invoke Service.
   
   ## Example
   
   - Configure Provider
   Configure protocol with a new attribute host:
   ```
   <dubbo:protocol name="dubbo" port="28080" host="www.example.com" />
   ```
   Then providers will register 
dubbo://www.example.com:28080/com.test.HelloService to registry servers.
   We also can config the host param in Service Config or Registry Config.
   
   - Configure Consumer
   Nothing need to configure except opening /etc/hosts and adding one line:
   www.example.com 10.1.1.3
   # assume 10.1.1.3 is the mapping proxy IP for real Provider IP
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to