Using Jedis can we redirect read and write calls to elastiCache reader and primary endpoints.?

38 Views Asked by At

Using Jedis can we redirect read and write calls to elastiCache reader and primary endpoints.?

Can we configure Reader Endpoint of elastic cache for read actions. and primary endpoint for write calls

using Jedis client

I couldn't find a way to configure reader endpoint from Jedis.

something like this from lettuce. LettuceClientConfiguration clientConfig = LettuceClientConfiguration.builder() .readFrom(ReadFrom.REPLICA_PREFERRED) .useSsl() .build();

1

There are 1 best solutions below

0
SerhiiH On

For Jedis client it appears to be that you need to maintain two separate clients for master and for replica.

If you have troubles finding those URLs, take a look here:

Amazon ElastiCache Replication Endpoints