简体   繁体   中英

Redis sentinel with only one host

I need to setup a development environment with redis. It need to have sentinels, to replicate the behavior we have in production (because our client applications use a JedisSentinelPool to connect).

Unfortunately I only have one host available. Is it still possible to run a sentinel even though there's only one instance? Do I need to change the config?

Yes you can. Just start redis master, slaves and sentinels on different ports, and run them on the same machine. A redis process is lightweight - you can run them all on a single server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM