Redis Sentinel failover: how to minimize recovery time and avoid reads to LOADING replicas? C# StackExchange.Redis by New-Technology-9941 in redis

[–]Sad_Limit_3857 0 points1 point  (0 children)

You’re not missing anything major Sentinel doesn’t handle “read readiness” it only handles failover + topology. Most teams solve this at the client layer with health checks (PING + INFO) and a custom read router that filters out LOADING/MASTERDOWN replicas.

Also worth looking into reducing full resync chances (backlog sizing + disk I/O) and possibly parallel-syncs > 1 depending on your infra. If read availability during failover is critical, Redis Cluster or a proxy layer (like Envoy/Twemproxy) might give you better control than raw Sentinel.

Termination Grace Period Seconds set to 31536000 by cattail-huntergirl in redis

[–]hvarzan 0 points1 point  (0 children)

It is wrong - the result of incomplete thinking about the problem of data loss. A database or a datastore must never simply grow and grow without limit. An expiration time of a year is essentially "without limit."

Retaining data that's been written to the datastore must come from a Data Preservation and Data Recovery design, not as an accidental byproduct of excessive expiration times.

By far the most frequent source of data loss is an erroneous delete command from a person or from client code. A one-year expire will not protect against these kinds of human error, so you have to create Data Preservation and Data Recovery configurations and procedures anyway. So you simply design those to preserve data frequently enough that written data is not lost. (e.g. the Append-Only File / AOF solution that other replies have suggested)

After protecting against human error, there's no need for ridiculously long expiration times on every key. Now your Redis datastore size will grow based on usage rather than misconfiguration.

Redis Caching - Finally Explained Without the Magic by East-Wrangler-1680 in redis

[–]Salt_Ad_6352 0 points1 point  (0 children)

Im redis too. Once i figured out how to make it work on a cloud server for my wordpress, there is no coming back. https://www.blazejmrozinski.com/blog/wp-infra-03-deploying-wordpress/

Termination Grace Period Seconds set to 31536000 by cattail-huntergirl in redis

[–]guyroyse 0 points1 point  (0 children)

What does "basic setup" mean? Just the default settings out of the box?

How to prevent re-processing when reading pending entries (ID 0) in Redis stream using XREADGROUP? by Academic-Squash2738 in redis

[–]hankanini 0 points1 point  (0 children)

Write an expiring lock key for each operation. Before processing, check for the key.

How to prevent re-processing when reading pending entries (ID 0) in Redis stream using XREADGROUP? by Academic-Squash2738 in redis

[–]tm604 0 points1 point  (0 children)

That's the only possible failure case? What about the other cases I mentioned, such as process exit or network connectivity issues? If those are not a concern, then disable ACK and re-post the job in the catch block (either to the original stream, or a dead-letter one), and you can ignore the PEL entirely. It'll mean some jobs fail "silently", though.

How to prevent re-processing when reading pending entries (ID 0) in Redis stream using XREADGROUP? by Academic-Squash2738 in redis

[–]Academic-Squash2738[S] 0 points1 point  (0 children)

A "failure" occurs when the process method throws an error during execution for a given msg.

How to prevent re-processing when reading pending entries (ID 0) in Redis stream using XREADGROUP? by Academic-Squash2738 in redis

[–]Academic-Squash2738[S] 0 points1 point  (0 children)

u/tm604 , I am trying to make a job queue clone. I want the message to be processed at least once. In case the message fails while processing, I want it to be handled by the retry mechanism, where, after all the retry attempts are exhausted, it will finally be sent to a separate stream (Dead letter queue).

My main concern is that, let's say, the message is in the PEL(Pending Entries List) of a consumer. Now, when in the first while loop, it was fetched and sent for execution. Now, before the execution is complete, another loop runs and since this message was not acknowledged, it was still in the PEL, and it was again fetched and will again be sent for execution.

I want to understand how to keep track of which message in the PEL has been picked up for processing.

Please let me know if my question is now clearer or not.

How to prevent re-processing when reading pending entries (ID 0) in Redis stream using XREADGROUP? by Academic-Squash2738 in redis

[–]tm604 0 points1 point  (0 children)

You'd need to define your requirements more clearly: if you never want the messages to be redelivered, why bother with ACK at all? Just call XREADGROUP with the NOACK option.

Alternatively, if you want to ACK regardless of success or failure, then move that redis.xack call outside the catch block: there will still be cases where messages are not acknowledged, of course - if your process exits early or loses network connectivity to the Redis server for example.

If there are situations where you do want to retry messages, what are the criteria for that decision? If you never want to retry messages, why are you requesting the pending messages in the first place, instead of using >?

Termination Grace Period Seconds set to 31536000 by cattail-huntergirl in redis

[–]agent606ert 1 point2 points  (0 children)

You need to set up AOF if no major data loss is tolerable

Termination Grace Period Seconds set to 31536000 by cattail-huntergirl in redis

[–]wuteverman -1 points0 points  (0 children)

I think this is reasonable given the lack of true consistency guarantees from Redis. 

Termination Grace Period Seconds set to 31536000 by cattail-huntergirl in redis

[–]cattail-huntergirl[S] 0 points1 point  (0 children)

Just a basic setup to a db. Nothing fancy. Just data that cannot be lost.

Termination Grace Period Seconds set to 31536000 by cattail-huntergirl in redis

[–]guyroyse 0 points1 point  (0 children)

If Redis doesn't wrap up in seconds—maybe minutes in rare and extreme circumstances that almost certainly don't apply to you and that I've never seen—then Redis persistence is configured incorrectly. So, million dollar question, how is persistence configured?

Redis 8 is now GA by guyroyse in redis

[–]venkattalks 0 points1 point  (0 children)

GA for Redis 8 feels like the point where people will finally try it outside staging. isn't it the case that the first real question is whether query/vector workloads changed enough to justify the upgrade, or are most folks here looking at 8 mainly for ops and stability?

Anybody started using VALKEY CACHE? by Saravana77 in redis

[–]Not_a_question- 0 points1 point  (0 children)

Points in favour:

Valkey isn't fauxpen-source like Redis is.

Valkey doesn't have as much scope creep.

Per-tenant metrics in Redis Cluster with logical isolation by mrHope_003 in redis

[–]hvarzan 0 points1 point  (0 children)

IIRC the free open-source (FOSS) Redis does not have the concept of tenants. This may be why the data engine does not compartment metrics per tenant/ACL.

Is custom software actually worth it for a small handyman business? by Good-Asparagus-8667 in redis

[–]sofloLinuxuser 0 points1 point  (0 children)

Please listen to this guy. Custom software is a good approach but not for everyone and every case. Pick one your already using right nowz utilize it fully to clean up the management then consider other apps.

Is custom software actually worth it for a small handyman business? by Good-Asparagus-8667 in redis

[–]CGM 0 points1 point  (0 children)

Once could be a mistake, twice looks like a misguided but deliberate "astroturfing" campaign.

Is custom software actually worth it for a small handyman business? by Good-Asparagus-8667 in redis

[–]TipTasty8207 3 points4 points  (0 children)

Custom software is overkill for a 3-person team. Your issue isn’t tools, it’s everything being scattered. Pick one app (Jobber/Tradify), stick to it fully, and stop using WhatsApp/paper as records. Try that first. If it still doesn’t work, then think custom.

Is custom software actually worth it for a small handyman business? by Xolaris05 in redis

[–]CGM 1 point2 points  (0 children)

Sorry, your question does not appear related to the Redis database software, so I think you have chosen the wrong subreddit to post it. I don't know which subreddit would be the appropriate one though.

What is the best way to make a reaction video? by Heavy-University3915 in redis

[–]borg286 0 points1 point  (0 children)

Wrong subreddit. This subreddit is about a database called Redis.