Code Monkey home page Code Monkey logo

eureka-ha's Introduction

搭建高可用的Eureka注册中心


分支说明

  • dev_use_hosts是常用的配置hosts启动方式: 使用hosts区分hostname  
  • dev_no_hosts是不配置hosts的启动方式: 使用当前机器IP地址、17.0.0.1和localhost区分hostname

使用说明

项目中配置说明

项目中Eureka配置非常简单,如果是分别部署在三台机器上,只须按如下配置每个Eureka并修改defaultZone的server2IP和server3IP为相应的机器地址即可。如果部署在单台机器上(一般都不会这样做),参考no_hosts分支即可。

spring:
  application:
    name: eureka

server:
  port: 8761

eureka:
  instance:
    hostname: ${spring.cloud.client.ipAddress}
    prefer-ip-address: true
  client:
    serviceUrl:
      defaultZone: http://server2IP:8761/eureka/,http://server3IP:8761/eureka/

更加详细的说明

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.