Create a Redis Flex database

Shows how to create an Redis Flex database on Redis Cloud and describes the best use cases for Redis Flex.

Redis Flex databases have a tiered solid state drive (SSD) and RAM architecture. Using SSDs instead of RAM significantly reduces infrastructure costs, which means developers can build applications that require large datasets using the same Redis API.

Redis Flex databases are compatible with most existing Redis applications, except for applications that use Search and Query and Time Series.

Redis Flex is currently available in preview on Redis Cloud Essentials.

Redis Flex use cases

The benefits associated with Redis Flex are dependent on the use case.

Redis Flex is ideal when your:

  • working set is significantly smaller than your dataset (high RAM hit rate)
  • average key size is smaller than average value size (all key names are stored in RAM)
  • most recent data is the most frequently used (high RAM hit rate)

Redis Flex is not recommended for:

  • Long key names (all key names are stored in RAM)
  • Broad access patterns (any value could be pulled into RAM)
  • Large working sets (working set is stored in RAM)
  • Frequently moved data (moving to and from RAM too often can impact performance)

Redis Flex is not intended to be used for persistent storage.

Where is my data?

When using Redis Flex, RAM storage holds:

  • All keys (names)
  • Key indexes
  • Dictionaries
  • Hot data (working set)

All data is accessed through RAM. If a value in flash memory is accessed, it becomes part of the working set and is moved to RAM. These values are referred to as “hot data”.

Inactive or infrequently accessed data is referred to as “warm data” and stored in flash memory. When more space is needed in RAM, warm data is moved from RAM to flash storage.

Create a Redis Flex database on Redis Cloud Essentials

Before creating a Redis Cloud database, you need to create an account.

To create a database in your Redis Cloud account:

  1. Sign in to the Redis Cloud console.

  2. Select the New database button.

    The New Database button creates a new database.

    This displays the Create database screen.

  1. Select your Redis use case. There are three pre-defined use cases supported with Redis Flex:

    The Redis Use case panel
    • Cache: Stores short-term or volatile data. Can be used for session management, semantic cache, session store, and other uses where data is short-lived.
    • Database: Stores durable and consistent data. Can be used for document databases, feature storage, gaming leaderboards, durable caches, and other uses where your data needs to be highly available and persistent.
    • Custom: If your Redis use case doesn't match any of the other use cases, you can choose this option to customize all of your settings.

    Select the use case that best matches your Redis use case. You can always change the settings later.

    The Vector search use case is not supported with Redis Flex.

    Note:
    See Use case settings to view the default settings for each use case.
  2. Select the type of subscription you need. For this guide, select Redis Flex.

    The Subscription selection panel with Redis Flex selected.
    Note:

    This guide shows how to create a Redis Flex database on Redis Cloud Essentials.

    After you select Redis Flex, the rest of the database details will appear.

    The database name, cloud vendor, region, and type settings.
  3. Redis will generate a database name for you. If you want to change it, you can do so in the Database name field.

  4. Choose a Region on Amazon Web Services for your database.

  5. In the Durability settings panel, choose your High availability settings and Data persistence settings from the list.

    The durability settings allow you to choose High availability and Data persistence.

    Redis Cloud supports the following high availability settings:

    • None: You will have a single copy of your database without replication.
    • Single-Zone: Your database will have a primary and a replica located in the same cloud zone. If anything happens to the primary, the replica takes over and becomes the new primary.
    • Multi-Zone: The primary and its replicas are stored in different zones. This means that your database can remain online even if an entire zone becomes unavailable.

    See High availability for more information about these settings.

    Redis Cloud supports the following Data persistence options:

    • An Append-Only File maintains a record (sometimes called a redo log or journal) of write operations. This allows the data to be restored by using the record to reconstruct the database up to the point of failure. For Essentials databases, Redis updates the Append-Only file every second.

    • A Snapshot is a copy of the in-memory database, taken at periodic intervals (one, six, or twelve hours). You can restore data to the snapshot's point in time.

    See Data persistence for more information about these settings.

    These settings may already be set based on the use case you selected. You can change them now if you like.

  6. Select the desired memory limit.

    Available Redis Flex plans.

    For a comparison of available plans, see Redis Cloud Essentials plans.

  7. Enter your payment details.

    If you haven't previously entered a payment method, use the Add Credit Card button to add one.

    The Add credit card icon.
  8. Select Confirm & pay to create your database.

Select Confirm & Pay to create your new database.

When you create your database, there's a brief pause while your request is processed and then the Database details page appears.

Use case settings

The following table shows the default use case settings for an Essentials database.

Type High Availability Data Persistence Size Eviction Policy
Cache None None 30 MB - 12 GB volatile-lru
Database Multi-zone Append-only file every 1 sec 250 MB - 12 GB None
Custom Single-zone Append-only file every 1 sec 250 MB - 12 GB None
RATE THIS PAGE
Back to top ↑