-
Using lettuce driver for elastic cache connections, the elastic cache is cluster enabled. currently, it has two shards and 3 nodes in each shard. Due to some network restriction, connections need to be behind a proxy so I am using an Nginx stream proxy below is the Nginx conf
below is the Redis template code
initial connection to cluster happens fine but whenever I tried to perform read operation using redistemplate, it discovers the actual Redis nodes(node1-1, node1-2, node1-3, node2-1, node2-2, node2-3) and uses them, that leads to connection timed out since cluster nodes are not reachable, so How to override such a way that it gets always overriding with Nginx IP I have configured. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can configure a |
Beta Was this translation helpful? Give feedback.
You can configure a
MappingSocketAddressResolver
taking aFunction<HostAndPort, HostAndPort>
to map hostnames and ports viaClientResources
.