すべてのプロダクト
Search
ドキュメントセンター

ApsaraDB for Memcache:Limits

最終更新日:Jan 20, 2025

This topic describes the limits of ApsaraDB Memcache.

Limits

Project

Description of limits

Data types

ApsaraDB Memcache supports only Key-Value format data. Complex data types such as array, map, and list are not supported.

Data reliability

Data in ApsaraDB Memcache is stored in memory. The service does not guarantee that cached data will not be lost. Data that requires strong consistency is not suitable for storage.

Data size

ApsaraDB Memcache supports a maximum Key size of 1 KB and a maximum Value size of 1 MB for a single piece of cached data. Data that is too large is not suitable for storage.

Transaction support

ApsaraDB Memcache does not support transactions. Data that requires transactional support should not be written to ApsaraDB Memcache but should be directly written to the database.

Scenarios

When data access is evenly distributed and there is no significant distinction between hot and cold data, many access requests may not hit ApsaraDB Memcache. In such cases, using ApsaraDB Memcache as a database cache may not be effective. When selecting a cache, you need to fully consider the requirements of your business model for data access.

Data deletion policy

The expiration mechanism of ApsaraDB Memcache is as follows: The expiration time of each Key is determined by the user-defined expiration time. After expiration, the Key can no longer be accessed by users. However, the space occupied by these Keys will not be immediately reclaimed after expiration. Instead, the space is reclaimed collectively at around 2:00 AM.

Data expiration policy

Consistent with the open-source Memcached policy, the LRU algorithm is used to expire data. However, expired data will not be immediately deleted to reclaim space. The space reclamation operation is periodically executed by a background program.

Connection handling

The ApsaraDB Memcache server does not proactively shut down idle client connections.

Data expiration

The expiration time of Keys is recommended to be actively controlled and managed by users.