centrifugal / centrifugo

Scalable real-time messaging server in a language-agnostic way. Self-hosted alternative to Pubnub, Pusher, Ably. Set up once and forever.
https://centrifugal.dev
Apache License 2.0
8.38k stars 594 forks source link

Redis Sentinel support #79

Closed FZambia closed 8 years ago

FZambia commented 8 years ago

At moment we have pretty efficient Redis engine which allows to scale Centrifugo to many nodes. In this situation setup limited by Redis throughput - this is more than enough for most cases as Redis capable to serve tens of thousands requests per second. So this is ok for most projects in Internet (I am not considering giants).

The weak point in this architecture is that Redis is single point of failure. When it comes to setting up Centrifugo on your servers and you want High Availability for Redis then you should invent tricky proxies - something like tricky Haproxy setup for example.

So I think it's time to support official way to add HA to Redis – Redis Sentinel.

At moment Redis driver we use - Redigo - does not support Sentinel, I am experimenting with its fork to add Sentinel support. We can also consider moving to another Redis client - there are many of them

FZambia commented 8 years ago

At moment I came up with writing a small library on top of Redigo which allows to add basic Sentinel support.

FZambia commented 8 years ago

Done in v1.4.2