You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My condition differs from it a little: a socks proxy add between client and redis.
lettuce <--> socks proxy A <--> redis server
lettuce <--> socks proxy B <--> redis server
Is there any application feature for client to detect server alive or reachable? Because, SocketOptions and EpollChannelOption.TCP_KEEPINTVL works on TCP layer.
1 if there is a TCP socks proxy between lettuce and redis server;
2 the TCP keep-alive data packet can not be transferred to redis server;
3 if socks proxy A can not reach redis server temporary eg. 20 minutes.
on the 3 items above, clients connected with A can not know whether the server is reachable in a short time, if only depends on TCP keep-alive. setget, pubsub, and lock can not work.
Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I have an issue when [...]
Describe the solution you'd like
Application level keep alive configuration.
A clear and concise description of what you want to happen. Add any considered drawbacks.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
ConnectionPoolSupport is a very thin layer on top of Apache Commons Pool 2. The object validation uses a check based on whether the socket is connected. If we would use e.g. PING and a blocking command is ongoing, we would easily cause a situation where validation isn't working for everyone.
You can easily provide such a wrapper in your own code.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 2 weeks this issue will be closed.
Activity
mp911de commentedon Nov 21, 2022
Then your proxy server should disconnect the connection. Otherwise, we're trying to work around a very specific scenario.
neioWHU commentedon Nov 21, 2022
Can lettuce consider introducing the testonborrow mechanism?
mp911de commentedon Nov 21, 2022
ConnectionPoolSupportis a very thin layer on top of Apache Commons Pool 2. The object validation uses a check based on whether the socket is connected. If we would use e.g.PINGand a blocking command is ongoing, we would easily cause a situation where validation isn't working for everyone.You can easily provide such a wrapper in your own code.
tishun commentedon Feb 14, 2025
See #3177 for a possible solution using NettyCustomizer
github-actions commentedon Mar 17, 2025
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 2 weeks this issue will be closed.