We operate Hangfire using Hangfire.Pro.Redis against a Redis OSS 7.x Elasticache replication group with a master and a single read replica.
We are still using Hangfire.AspNetCore 1.7.37. and hence are using Hangfire.Pro.Redis 2.11.1
I would like to make use of the read replica if possible.
Does Hangfire.Pro.Redis make use of read replicas splitting the read and write workloads correctly between the two endpoints?
I am setting the endpoints in the StackExchange.Redis.ConfigurationOptions
EndPointCollection endpoints = new EndPointCollection
{
{ Host, Port }
};
// add the replica endpoint if it has been set
if(!string.IsNullOrEmpty(ReplicaHost) && ReplicaPort.HasValue)
{
endpoints.Add(ReplicaHost, ReplicaPort.Value);
}
Is there anything extra that needs to be done?
How does Hangfire.Pro.Redis know one is a read replica not another master?
I have read the documentation which is fairly light on detail and searched for similar queries here.