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: articles/azure-cache-for-redis/cache-best-practices-connection.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: flang-msft
6
6
7
7
ms.service: cache
8
8
ms.topic: conceptual
9
-
ms.date: 08/03/2022
9
+
ms.date: 02/27/2023
10
10
ms.author: franlanglois
11
11
---
12
12
@@ -22,9 +22,9 @@ Test your system's resiliency to connection breaks using a [reboot](cache-admini
22
22
23
23
## TCP settings for Linux-hosted client applications
24
24
25
-
The default TCP settings in some Linux versions can cause Redis server connections to fail for 13 minutes or more. The default settings can prevent the client application from detecting closed connections and restoring them automatically if the connection was not closed gracefully.
25
+
The default TCP settings in some Linux versions can cause Redis server connections to fail for 13 minutes or more. The default settings can prevent the client application from detecting closed connections and restoring them automatically if the connection wasn't closed gracefully.
26
26
27
-
The failure to reestablish a connection can happen occur in situations where the network connection is disrupted or the Redis server goes offline for unplanned maintenance.
27
+
The failure to reestablish a connection can happen in situations where the network connection is disrupted or the Redis server goes offline for unplanned maintenance.
28
28
29
29
We recommend these TCP settings:
30
30
@@ -85,10 +85,12 @@ Apply design patterns for resiliency. For more information, see [How do I make m
85
85
86
86
## Idle timeout
87
87
88
-
Azure Cache for Redis currently has a 10-minute idle timeout for connections, so the idle timeout setting in your client application should be less than 10 minutes. Most common client libraries have a configuration setting that allows client libraries to send Redis `PING` commands to a Redis server automatically and periodically. However, when using client libraries without this type of setting, customer applications themselves are responsible for keeping the connection alive.
88
+
Azure Cache for Redis has a 10-minute timeout for idle connections. The 10-minute timeout allows the server to automatically clean up leaky connections or connections orphaned by a client application. Most Redis client libraries have a built-in capability to send `heartbeat` or `keepalive` commands periodically to prevent connections from being closed even if there are no requests from the client application.
89
+
90
+
If there's any risk of your connections being idle for 10 minutes, configure the `keepalive` interval to a value less than 10 minutes. If your application is using a client library that doesn't have native support for `keepalive` functionality, you can implement it in your application by periodically sending a `PING` command.
89
91
90
92
## Next steps
91
93
92
94
-[Best practices for development](cache-best-practices-development.md)
93
95
-[Azure Cache for Redis development FAQ](cache-development-faq.yml)
0 commit comments