Skip to content

Commit 4f28514

Browse files
Merge pull request #228990 from flang-msft/fxl---Update-cache-best-practices-memory-management-
Fxl--update cache best practices memory management
2 parents 0f42ec1 + 3c2c91f commit 4f28514

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

articles/azure-cache-for-redis/cache-best-practices-connection.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: flang-msft
66

77
ms.service: cache
88
ms.topic: conceptual
9-
ms.date: 08/03/2022
9+
ms.date: 02/27/2023
1010
ms.author: franlanglois
1111
---
1212

@@ -22,9 +22,9 @@ Test your system's resiliency to connection breaks using a [reboot](cache-admini
2222

2323
## TCP settings for Linux-hosted client applications
2424

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.
2626

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.
2828

2929
We recommend these TCP settings:
3030

@@ -85,10 +85,12 @@ Apply design patterns for resiliency. For more information, see [How do I make m
8585

8686
## Idle timeout
8787

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.
8991

9092
## Next steps
9193

9294
- [Best practices for development](cache-best-practices-development.md)
9395
- [Azure Cache for Redis development FAQ](cache-development-faq.yml)
94-
- [Failover and patching](cache-failover.md)
96+
- [Failover and patching](cache-failover.md)

0 commit comments

Comments
 (0)