jedis icon indicating copy to clipboard operation
jedis copied to clipboard

Rework/rethink about JedisSocketFactory with HostAndPort

Open sazzad16 opened this issue 4 years ago • 0 comments

Introducing JedisSocketFactory is a neat idea. However, it raises the question of how addressing should work. Right now, HostAndPort was the only mechanism to obtain a connection. With domain sockets, you need another way to connect to a node. I'd suggest introducing an interface and replace all usages of HostAndPort (breaking change, potentially a 4.0 topic) with that interface. Behind that interface, one can put addressing details so one could e.g. connect to Sentinel using domain sockets (or do other crazy things). You could even have an SSL implementation of JedisSocketFactory that uses SSL details from a SecureHostAndPort.

Thanks to @mp911de https://github.com/redis/jedis/pull/2293#issuecomment-806905207

sazzad16 avatar Aug 16 '21 13:08 sazzad16