Skip to content

Commit 1788320

Browse files
committed
Learn Editor: Update time-to-live.md
1 parent 92dc049 commit 1788320

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ ms.date: 11/03/2023
1414

1515
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.
1616

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.
17+
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 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.
18+
19+
For Provisioned Throughput accounts, the deletion of expired items uses leftover Request Units that haven't been consumed by user requests. For Serverless accounts, the deletion of expired items is charged in Request Units at the same rate as delete item operations.
1820

1921
> [!NOTE]
2022
> 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)