Is there a reliable way to notify clients that their server is not running?

My Redis database is holding a few key/value pairs with some sort of status information to show our clients the status of a component.
If a server shutdown occurs is there a possibility to notify all clients that the current status information is not correct/up-to-date anymore?

In a Summary:
I store status informations → server shutdown occurs → notify clients that status is not valid anymore

Thanks for your help

Are you talking about the Redis server or another server? If you have a high-availability Redis deployment, then you application can just fail over to a replica. Will that work?

Thanks for your answer.

Yes, I’m talking about a Redis-Server. Maybe that can work yes, but is there a possibility to notify all clients that there was a failover and that we are using the replica-server now?


Have you checked out Redis Sentinel or Redis Cluster? Both have failover mechanisms that may help with what you’re trying to do.

At my Use Case, Redis Cluster is not an option. I will give the Sentinel Event Notification a try.
Thanks for all your answers!

I have three nodes redis ha wiith the help of sentinel. failover is working fine if i shutdown the master redis machine. I have a challenge. when the redis master role switchover to new machine then how the application get aware ? Any document which can describe the configuration of switching VIP to new Master Server.

Which client do you use to connect Redis? Most of the client can automatically discover fail over.
Also you can register to the Sentinel notifications read more about it here: High availability with Redis Sentinel | Redis

there is a home made application and an option is available to specify IP address of REDIS. I assume that we need to create an option in application where we should add all REDIS IP and send request to all IPs, the Master will pick the request of application