Redis sentinel with only one host

1.3k Views Asked by At

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?

1

There are 1 best solutions below

1
On BEST ANSWER

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.