zoukankan      html  css  js  c++  java
  • Eureka系列---【Eureka如何实现高可用?】

    Eureka的高可用解决方案

    一、双机部署

     分析:

    1.Eureka的server端相互注册,自动相互同步应用信息;

    2.Eureka的client端注册到任意一个上面即可,但为了保险起见,我们常同时注册到两个上面,来防止client注册到server1后,server1挂掉,client重启后注册不上;

    server1的配置文件:

    eureka:
        client:
            service-url:
                defaultZone: http://localhost:8762/eureka
         register-with-eureka: false

    server2的配置文件:

    eureka:
        client:
            service-url:
                defaultZone: http://localhost:8761/eureka
         register-with-eureka: false

    client的配置文件:

    eureka:
        client:
            service-url:
                defaultZone: http://localhost:8761/eureka,http://localhost:8762/eureka

    二、多机部署

     分析:

    1.server端两两相互注册;

    2.client端同时注册到三个上面;

    server1的配置文件:

    eureka:
        client:
            service-url:
                defaultZone: http://localhost:8762/eureka,http://localhost:8763/eureka
         register-with-eureka: false

    server2的配置文件:

    eureka:
        client:
            service-url:
                defaultZone: http://localhost:8761/eureka,http://localhost:8763/eureka
         register-with-eureka: false

    server3的配置文件:

    eureka:
        client:
            service-url:
                defaultZone: http://localhost:8761/eureka,http://localhost:8762/eureka
         register-with-eureka: false

    client的配置文件:

    eureka:
        client:
            service-url:
                defaultZone: http://localhost:8761/eureka,http://localhost:8762/eureka,http://localhost:8763/eureka
    愿你走出半生,归来仍是少年!
  • 相关阅读:
    万能转换器boost::lexical_cast
    6.1.5 文本文件与二进制文件
    HDU4002 Find the maximum [数论]
    HDU4001 To Miss Our Children Time [DP]
    HDU3247 Resource Archiver [AC自动机+DP]
    HDU2457 DNA repair [AC自动机+DP]
    HDU2825 Wireless Password [AC自动机+压缩DP]
    ZOJ3228 Searching the String [AC自动机]
    HDU4003 Find Metal Mineral [树形DP]
    ZOJ3494 BCD Code [AC自动机+DP]
  • 原文地址:https://www.cnblogs.com/hujunwei/p/14444766.html
Copyright © 2011-2022 走看看