Redis read replica usage

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.

Regular reads performed as a part of background processing itself (e.g. read background job data) can’t be moved to replica, because consistency model will be violated with stale reads. However, monitoring-related queries can be moved to slaves, indeed, since dashboard can tolerate stale reads. This feature is planned to Hangfire.Pro.Redis 3.1, and preparation work was already done in Hangfire.Core 1.8.0 with the new GetReadOnlyConnectionmethod implementation.