minecrafter / RedisBungee

The leading player synchronization system for BungeeCord
https://www.spigotmc.org/resources/redisbungee.13494/
Eclipse Public License 1.0
157 stars 122 forks source link

RedisBungee should support Redis Sentinel #17

Closed NaomiAmethyst closed 7 years ago

NaomiAmethyst commented 9 years ago

RedisBungee should support Redis Sentinel for redundant deployments of Redis. I would prefer that the server running Redis not be a single point of failure.

minecrafter commented 9 years ago

Although I don't anticipate most RedisBungee users needing Sentinel, I will investigate adding support for it.

minecrafter commented 9 years ago

@Cobi: I don't think I will add Redis Sentinel support to the public version of RedisBungee just yet, mainly due to support and time constraints. How badly would you want this?

ghost commented 8 years ago

@Cobi and others looking for this feature, I'm planning to add support for Redis Sentinel if there are still people looking for it, so please do let me know :+1:

detobel36 commented 7 years ago

News about that ?

ghost commented 7 years ago

There where no requests to add it in the past few months

detobel36 commented 7 years ago

hum :confused:
And if I would like to develop it myself, what needs to be changed ? I thought it was natively supported by redis...

Moehritz commented 7 years ago

Honestly, the required changes are minimal.

I built Sentinel support into RedisBungee a while ago (this has not made it into a PR because the source of the JedisPool came from one of my personal plugins)

Basically, it's just replacing JedisPool with Pool<Jedis> (which is a parent class). Tbh, that's everything it takes to make RedisBungee compatible with Sentinel. Now you just have to initialize it, which is euqally simple: Old: new JedisPool(config, redisServer, redisPort, 0, finalRedisPassword); New: new JedisSentinelPool(master, hosts, config, finalRedisPassword);