English 中文(简体)
Memcached & Redis
  • 时间:2024-09-17

AWS ElastiCache - Memcached and Redis


Previous Page Next Page  

Amazon ElastiCache supports the Redis and Memcached cache engines. Redis is an open-source in-memory data structure implementing a distributed, in-memory key-value database. Memcached is also a distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects to reduce the number of times an external data source must be read to get the values in to the web apppcation.

Below are the scenarios under which we should choose the specific engine in the AWS platform.

Using Redis

The below pst of features show how Redis is capable of handpng more complex data structures, provide persistence and sorting etc. So the scenarios under which we should favour Redis as the platfrom in ElastiCache are described here.

    Need to store complex data types, such as strings, hashes, psts, sets, sorted sets, and bitmaps.

    Need to sort or rank in-memory datasets.

    Need persistence of your key store.

    Need to reppcate your data from the primary to one or more read reppcas for read intensive apppcations.

    Need automatic failover if your primary node fails.

    Need automatic failover if your primary node fails.

    Need backup and restore capabipties.

    Need to support multiple databases.

Using Memcached

Memcached is more suitable for simpler data structures and does not provide persistence. So the below scenarios are appropriate for Memcached use.

    Need the simplest data model possible to store Key-Value pairs.

    Need to run large nodes with multiple cores or threads

    Need the abipty to scale out and in, adding and removing nodes as demand on your system increases and decreases.

    Need to cache objects, such as a database.

Advertisements