eureka dns name configuration

spring cloud version 2.0.1.RELEASE

 

 

Compared to ip-based configuration, you need to add configuration items to:

1. use-dns-for-fetching-service-urls: true

The settings depend on open dns lookup relies

2. region: default

According to their actual environment

3. eurekaServerURLContext: eureka

dns can only get ip, service instances require stitching request address

4. eureka-server-port: 10000

dns only get IP, service instances need splicing request port, such as inconsistent and eureka server default port, where required configuration

5. ​​​​​​​eureka-server-d-n-s-name: demo.pt.personal.com

The configuration of the position values, and the region will be spliced ​​internal eureka parsing, the prefix will fight txt, it is ultimately required in the domain name is configured (arranged in the current basis): txt.default.demo.pt. personal.com

 

According to the eureka dns to resolve, is the address of the available area, on this basis, will resolve secondary, if the above-described configuration dns ip address eureka Server directly, and an error is reported, the service can not be started, the following configuration is required (assuming there are two available zone1 zone2 area):

Key: txt.default.demo.pt.personal.com value: default.zone1.demo.pt.personal.com default.zone2.demo.pt.personal.com

Key: txt.default.zone1.demo.pt.personal.com value: 123.123.123.1 123.123.123.3

Key: txt.default.zone2.demo.pt.personal.com value: 123.123.123.2 123.123.123.4

To complete the configuration.

 

The cause value txt.default.demo.pt.personal.com txt prefix is ​​not configured, eureka resolved when, on their own stitching on txt. Prefix.

 

Eureka server subsequent expansion, the need to deploy only a new instance, to modify the value of the corresponding key.

 

 

 

 

 

Published 20 original articles · won praise 0 · views 10000 +

Guess you like

Origin blog.csdn.net/u011248560/article/details/104952467