码迷,mamicode.com
首页 > 其他好文 > 详细

Eureka的集群配置

时间:2020-02-04 20:15:33      阅读:69      评论:0      收藏:0      [点我收藏+]

标签:图片   host   修改   etc   ica   png   zone   src   ora   

修改配置

spring:
  application:
    name: eureka-server
server:
  port: 7010
eureka:
  instance:
    hostname: eureka7010.com
  client:
    register-with-eureka: false
    fetch-registry: false
    service-url:
      defaultZone: http://eureka8010.com:8010/eureka/,http://eureka9010.com:9010/eureka/
spring:
  application:
    name: eureka-server
server:
  port: 8010
eureka:
  instance:
    hostname: eureka8010.com
  client:
    register-with-eureka: false
    fetch-registry: false
    service-url:
      defaultZone: http://eureka7010.com:7010/eureka/,http://eureka9010.com:9010/eureka/
spring:
  application:
    name: eureka-server
server:
  port: 9010
eureka:
  instance:
    hostname: eureka9010.com
  client:
    register-with-eureka: false
    fetch-registry: false
    service-url:
      defaultZone: http://eureka8010.com:8010/eureka/,http://eureka7010.com:7010/eureka/

修改hosts配置文件

127.0.0.1  eureka7010.com
127.0.0.1  eureka8010.com
127.0.0.1  eureka9010.com

把3个配置全部开启

技术图片

 

 查看页面

技术图片

 高可用

 配置成高可用的话,把2个false注释就行

技术图片

接着修改注册服务的配置

技术图片

 会发现每个节点里面都有注册的信息(下图为7010的,实际注册到8010的)

 技术图片

 

Eureka的集群配置

标签:图片   host   修改   etc   ica   png   zone   src   ora   

原文地址:https://www.cnblogs.com/dalianpai/p/12260637.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!