Giter Club home page Giter Club logo

redis-sentinel-samples's Introduction

docker redis哨兵模式搭建

一、基础配置

节点 IP 端口 备注
sentinel1 127.0.0.1 26379 哨兵1
sentinel2 127.0.0.1 26380 哨兵2
sentinel3 127.0.0.1 26381 哨兵3
redis-master 127.0.0.1 6379 默认主redis
redis-slave1 127.0.0.1 6380 默认从redis1
redis-slave2 127.0.0.1 6381 默认从redis2

二、注意

在使用docker进行部署时,如果采用默认配置,会导致哨兵提供容器内部ip,导致应用无法访问。
所以在进行redis配置的时候,需要加上以下一个配置

replica-announce-ip "192.168.0.35"

三、参考资料

redis-sentinel-samples's People

Contributors

fushindcw avatar

Stargazers

 avatar

Watchers

 avatar

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.