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
Copy file name to clipboardExpand all lines: content/develop/clients/lettuce/_index.md
+5-68Lines changed: 5 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,73 +83,10 @@ public class ConnectBasicTest {
83
83
}
84
84
```
85
85
86
-
### Timeouts
86
+
##More information
87
87
88
-
Lettuce provides timeouts for many operations, such as command execution, SSL handshake, and Sentinel discovery. By default, Lettuce uses a global timeout value of 60 seconds for these operations, but you can override the global timeout value with individual timeout values for each operation.
88
+
The [Lettuce reference guide](https://redis.github.io/lettuce/) has more examples
89
+
and an API reference. You may also be interested in the
90
+
[Project Reactor](https://projectreactor.io/) library that Lettuce uses.
89
91
90
-
{{% alert title="Tip" color="warning" %}}
91
-
Choosing suitable timeout values is crucial for your application's performance and stability and is specific to each environment.
92
-
Configuring timeouts is only necessary if you have issues with the default values.
93
-
In some cases, the defaults are based on environment-specific settings (e.g., operating system settings), while in other cases, they are built into the Lettuce driver.
94
-
For more details on setting specific timeouts, see the [Lettuce reference guide](https://redis.github.io/lettuce/).
95
-
{{% /alert %}}
96
-
97
-
Below is an example of setting socket-level timeouts. The `TCP_USER_TIMEOUT` setting is useful for scenarios where the server stops responding without acknowledging the last request, while the `KEEPALIVE` setting is good for detecting dead connections where there is no traffic between the client and the server.
98
-
99
-
```java
100
-
RedisURI redisURI =RedisURI.Builder
101
-
.redis("localhost")
102
-
// set the global default from the default 60 seconds to 30 seconds
When you connect to a Redis server with multiple endpoints, such as [Redis Enterprise Active-Active](https://redis.com/redis-enterprise/technology/active-active-geo-distribution/), you *must*
140
-
disable the JVM's DNS cache. If a server node or proxy fails, the IP address for any database
141
-
affected by the failure will change. When this happens, your app will keep
142
-
trying to use the stale IP address if DNS caching is enabled.
description: Get your Lettuce app ready for production
13
+
linkTitle: Production usage
14
+
title: Production usage
15
+
weight: 3
16
+
---
17
+
18
+
The following sections explain how to handle situations that may occur
19
+
in your production environment.
20
+
21
+
## Timeouts
22
+
23
+
Lettuce provides timeouts for many operations, such as command execution, SSL handshake, and Sentinel discovery. By default, Lettuce uses a global timeout value of 60 seconds for these operations, but you can override the global timeout value with individual timeout values for each operation.
24
+
25
+
{{% alert title="Tip" color="warning" %}}
26
+
Choosing suitable timeout values is crucial for your application's performance and stability and is specific to each environment.
27
+
Configuring timeouts is only necessary if you have issues with the default values.
28
+
In some cases, the defaults are based on environment-specific settings (e.g., operating system settings), while in other cases, they are built into the Lettuce driver.
29
+
For more details on setting specific timeouts, see the [Lettuce reference guide](https://redis.github.io/lettuce/).
30
+
{{% /alert %}}
31
+
32
+
Below is an example of setting socket-level timeouts. The `TCP_USER_TIMEOUT` setting is useful for scenarios where the server stops responding without acknowledging the last request, while the `KEEPALIVE` setting is good for detecting dead connections where there is no traffic between the client and the server.
33
+
34
+
```java
35
+
RedisURI redisURI =RedisURI.Builder
36
+
.redis("localhost")
37
+
// set the global default from the default 60 seconds to 30 seconds
When you connect to a Redis server with multiple endpoints, such as [Redis Enterprise Active-Active](https://redis.com/redis-enterprise/technology/active-active-geo-distribution/), you *must*
75
+
disable the JVM's DNS cache. If a server node or proxy fails, the IP address for any database
76
+
affected by the failure will change. When this happens, your app will keep
77
+
trying to use the stale IP address if DNS caching is enabled.
0 commit comments