Limits

Updated at:
Copy as MD

This topic describes the limits imposed on ApsaraDB for Memcache.

Items

Limits

Data type

ApsaraDB for Memcache supports only the data in the format of key-value pairs but does not support complex data types such as array, map, and list.

Data reliability

Data in ApsaraDB for Memcache is stored in the memory, and the stored data may be lost. Therefore, ApsaraDB for Memcache is not suitable for storing data that requires high consistency.

Data size

ApsaraDB for Memcache supports a maximum of 1 KB and 1 MB respectively for the key size and value size of a single piece of cached data. ApsaraDB for Memcache is not suitable for storing sizable data.

Transaction support

ApsaraDB for Memcache does not support transactions. Therefore, ApsaraDB for Memcache is not suitable for storing data with transaction requirements. Data with transaction requirements must be written into the database directly.

Application scenarios

When data access requests are evenly distributed, and there is no obvious hotspot or less popular data, a large number of access requests cannot hit the cache data in ApsaraDB for Memcache. Therefore, ApsaraDB for Memcache is ineffective when functioning as the database cache. You must give full consideration to the data access requirements of the business model when selecting the database cache.

Data deletion policy

The following information describes the expiration mechanism of ApsaraDB for Memcache: Each key expires at a user-defined time, and the key becomes inaccessible after expiration. The space occupied by the expired key is not recycled immediately after expiration. The occupied space is recycled at 02:00 every day.

Data expiration policy

Similar to Memcached, ApsaraDB for Memcache uses the least recently used (LRU) algorithm for expired data. The algorithm cannot be used to immediately remove the expired data from the recycle space. The system automatically removes data from the recycle space on a regular basis.

Connection

ApsaraDB for Memcache server does not automatically close idle client connections.

Data expiration

We recommend that you determine and manage the expiration time of keys.