Skip to content

Commit 709b27d

Browse files
committed
Merge branch 'docs-editor/time-to-live-1720446811' of https://github.com/GaryHopeMS/azure-docs-pr into cosmos-ttl-gary-hope
2 parents 89a6b4b + 2fd9137 commit 709b27d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

articles/cosmos-db/nosql/time-to-live.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ ms.reviewer: mjbrown
77
ms.service: azure-cosmos-db
88
ms.subservice: nosql
99
ms.topic: conceptual
10-
ms.date: 11/03/2023
10+
ms.date: 08/08/2024
1111
---
12+
1213
# Time to Live (TTL) in Azure Cosmos DB
14+
1315
[!INCLUDE[NoSQL](../includes/appliesto-nosql.md)]
1416

1517
With **Time to Live** or TTL, Azure Cosmos DB deletes items automatically from a container after a certain time period. By default, you can set time to live at the container level and override the value on a per-item basis. After you set the TTL at a container or at an item level, Azure Cosmos DB will automatically remove these items after the time period, since the time they were last modified. Time to live value is configured in seconds. When you configure TTL, the system automatically deletes the expired items based on the TTL value, without needing a delete operation explicitly issued by the client application. The maximum value for TTL is 2147483647 seconds, the approximate equivalent of 24,855 days or 68 years.
1618

17-
Deletion of expired items is a background task that consumes left-over [Request Units](../request-units.md) that haven't been consumed by user requests. Even after the TTL expires, if the container is overloaded with requests and if there aren't enough RUs available, the data deletion is delayed. Data is deleted once there are enough RUs available to perform the delete operation. Though the data deletion is delayed, data isn't returned by any queries (by any API) after the TTL expires.
19+
Expired items are deleted as a background task. An item will no longer appear in query responses immediately after the TTL expires, even if it hasn't yet been permanently deleted from the container. If the container does not have enough request units (RUs) to perform the deletion, the data deletion will be delayed. The data will be deleted once sufficient RUs are available to complete the deletion.
20+
21+
For provisioned throughput accounts, the deletion of expired items uses leftover RUs that haven't been consumed by user requests.
22+
23+
For serverless accounts, the deletion of expired items is charged in RUs at the same rate as delete item operations.
1824

1925
> [!NOTE]
2026
> This content is related to Azure Cosmos DB transactional store TTL. If you are looking for analytical store TTL, that enables NoETL HTAP scenarios through [Azure Synapse Link](../synapse-link.md), please click [here](../analytical-store-introduction.md#analytical-ttl).

0 commit comments

Comments
 (0)