Skip to content

Commit c3bd631

Browse files
Merge pull request #284087 from seesharprun/cosmos-ttl-gary-hope
Cosmos DB | Update TTL with serverless information
2 parents 58fb901 + f7d07ff commit c3bd631

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ ms.date: 08/08/2024
1616

1717
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 2,147,483,647 seconds, the approximate equivalent of 24,855 days or 68 years.
1818

19-
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 request units (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.
2024

2125
> [!NOTE]
2226
> 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)