prebid-cache icon indicating copy to clipboard operation
prebid-cache copied to clipboard

Add a Redis Sentinel backend

Open sebmil-daily opened this issue 1 year ago • 6 comments

This new backend allows using a Redis Sentinel cluster to reliably store objects in the cache.

With the redundancy and automatic master switching in a Redis Sentinel cluster, it ensures that the service and data stays available even if some of the storage nodes go down.

Please note that due to the delay in Redis replication, some of the most recent data inserted in the current master can be lost if this host goes down before having a chance to replicate the change. It also takes some time for Sentinel to detect a host going down and elect a new master, so a short outage may occur when the current master fails.

Redis Sentinel documentation (https://redis.io/docs/latest/operate/oss_and_stack/management/sentinel/) recommends a minimum of 3 nodes and gives several architecture examples.

sebmil-daily avatar Apr 26 '24 09:04 sebmil-daily

Hi @guscarreon , do you have some time to review this PR please ? As you were the one reviewing the first POC by @cyrinux , I think you already have the context 😄

sebmil-daily avatar May 13 '24 12:05 sebmil-daily

Hello, does any of you have time to review this PR ? Thank you

sebmil-daily avatar May 28 '24 14:05 sebmil-daily

Hi @sebmil-daily, thanks for your patience. We'll get to this shortly.

bsardo avatar May 30 '24 17:05 bsardo

Hello @bsardo , thanks for your last message. I'm just sending a small reminder at it was almost one month ago

sebmil-daily avatar Jun 27 '24 09:06 sebmil-daily

Hello, would anyone be available to review this ?

sebmil-daily avatar Jul 22 '24 12:07 sebmil-daily

Hi @guscarreon , thanks for the review and the suggestion.

I agree that this version has duplicated code, the objective was to clearly separate the configuration options for each scenario (as opposed to our initial PR which was mixing everything in redis.go) and keep compatibility with existing Redis deployments.

I will give a try at merging both source while keeping distinct configuration sections, but won't be able to submit a new PR before at least 2 month, as we have other priorities for the moment.

Right now, a version compiled from this PR is deployed in production on our side since one week, it's working great and fulfills all our requirements.

sebmil-daily avatar Sep 10 '24 09:09 sebmil-daily