zoukankan      html  css  js  c++  java
  • 3.spring cloud eureka 高可用

    1、目的 防止某一台服务器宕机 通常通过多台EUREKA来为客户端进行注册,客户也进行注册

    2、开启三台EUREKA

     三天EUREKA分别对应端口 8761 8762 8763

    配置文件如下

    EUREKA1

    eureka:
      client:
        service-url:
          defaultZone: http://localhost:8762/eureka,http://localhost:8763/eureka
        register-with-eureka: false
      server:
        enable-self-preservation: false
    spring:
      application:
        name: eureka
    #server:
    # port: 8761
    management:
      context-path: /

    EUREKA2

    eureka:
      client:
        service-url:
          defaultZone: http://localhost:8761/eureka,http://localhost:8763/eureka
        register-with-eureka: false
      server:
        enable-self-preservation: false
    spring:
      application:
        name: eureka
    #server:
    # port: 8761
    management:
      context-path: /

    EUREKA3

    eureka:
      client:
        service-url:
          defaultZone: http://localhost:8761/eureka,http://localhost:8762/eureka
        register-with-eureka: false
      server:
        enable-self-preservation: false
    spring:
      application:
        name: eureka
    #server:
    # port: 8761
    management:
      context-path: /

    CLIENT

    eureka:
      client:
        service-url:
          defaultZone: http://localhost:8761/eureka/,http://localhost:8762/eureka/,http://localhost:8763/eureka/
    spring:
      application:
        name: client

    3.启动客户端和三台EUREKA

    8761

    8762

    8763

  • 相关阅读:
    7.21 高博教育 数组 内存
    【基础扎实】Python操作Excel三模块
    PAT 甲级 1012 The Best Rank
    PAT 甲级 1011  World Cup Betting
    PAT 甲级 1010 Radix
    链式线性表——实验及提升训练
    循环程序设计能力自测
    链表应用能力自测
    PAT 甲级 1009 Product of Polynomials
    1008 Elevator (20分)
  • 原文地址:https://www.cnblogs.com/shuaihan/p/9999655.html
Copyright © 2011-2022 走看看