@@ -29,7 +29,6 @@ progress in implementing the recommendations.
29
29
{{< checklist-item "#client-side-caching" >}}Client-side caching{{< /checklist-item >}}
30
30
{{< checklist-item "#timeouts" >}}Timeouts{{< /checklist-item >}}
31
31
{{< checklist-item "#health-checks" >}}Health checks{{< /checklist-item >}}
32
- {{< checklist-item "#tcp-keepalive" >}}TCP keepalive{{< /checklist-item >}}
33
32
{{< checklist-item "#exception-handling" >}}Exception handling{{< /checklist-item >}}
34
33
{{< checklist-item "#dns-cache-and-redis" >}}DNS cache and Redis{{< /checklist-item >}}
35
34
{{< /checklist >}}
@@ -103,27 +102,6 @@ try (Jedis jedis = jedisPool.getResource()) {
103
102
Health checks help to detect problems as soon as possible without
104
103
waiting for a user to report them.
105
104
106
- ### TCP keepalive
107
-
108
- [ TCP keepalive] ( https://en.wikipedia.org/wiki/Keepalive ) is a technique
109
- where TCP packets are periodically sent on an otherwise idle connection
110
- to check that it is still working. You can enable TCP keepalive for a
111
- connection using an option on the connection config builder:
112
-
113
- ``` java
114
- JedisClientConfig clientConfig = DefaultJedisClientConfig . builder()
115
- .connectionTimeoutMillis(2000 )
116
- .socketTimeoutMillis(2000 )
117
- .tcpKeepAlive(true )
118
- .build();
119
-
120
- JedisPool pool = new JedisPool (poolConfig, " redis-host" , clientConfig);
121
- ```
122
-
123
- TCP keepalive can be especially useful to detect when unused connections
124
- in a [ connection pool] ( #connection-pooling ) have been dropped due to
125
- inactivity.
126
-
127
105
### Exception handling
128
106
129
107
Redis handles many errors using return values from commands, but there
0 commit comments