Release Notes
Announcements
Fault Type | Business Scenario | Lettuce Version | Core Issue |
Active switchover | Compatible version upgrade, proxy version upgrade, and data migration. | Lettuce versions before 6.1.05 | TCP Keepalive (to detect whether idle connections are alive) is not enabled by default, causing the client connection pool to be unaware of backend VIP switchovers. Old connections remain in the pool. Even after the server completes the switchover, the client continues to use invalid connections and throws errors. |
Passive switchover | The physical server crashes unexpectedly. | Lettuce versions before 6.3.0 | If the TCP_USER_TIMEOUT parameter is unconfigured, when the network is interrupted or a node goes down, the operating system may maintain half-open connections for a long time (not less than 30 minutes by default). The client connection pool cannot promptly reclaim these zombie connections, resulting in continuous errors. |
SocketOptions socketOptions = SocketOptions.builder().keepAlive(SocketOptions.KeepAliveOptions.builder()// Time interval between two keepalives..idle(Duration.ofSeconds(TCP_KEEPALIVE_TIME))// How long a connection remains idle before keepalive is started..interval(Duration.ofSeconds(TCP_KEEPALIVE_TIME/3))// Number of keepalives sent before the connection is disabled..count(3)// Whether to enable keepalive connection..enable().build()).tcpUserTimeout(SocketOptions.TcpUserTimeoutOptions.builder()// Resolve the long timeout issue caused by server rst..tcpUserTimeout(Duration.ofSeconds(TCP_USER_TIMEOUT)).enable().build())// Set TCP connection timeout..connectTimeout(Duration.ofMillis(redisConnectTimeout)).build();
フィードバック