# Create a Redis database
Source: https://docs.infraista.com/en/data-storage/redis/create-a-redis-database



**Before you start:** you need permission to create Redis databases (Owners, Admins and Developers by
default).

1. Go to **Data & Storage › Redis** and select **Create Redis**.

2. Enter a **Name**: 2 to 32 lowercase letters, numbers or hyphens, starting with a letter. It becomes
   part of the host name.

3. Optionally pick a **Project** to group the cost on invoices.

4. Pick the **Memory** plan. Each plan shows its memory, vCPU and monthly price. You can move to a bigger
   or smaller plan later; it applies instantly, with no restart.

5. Choose the **Eviction policy**: what happens when memory is full.

   | Policy         | Behavior                                                                       |
   | -------------- | ------------------------------------------------------------------------------ |
   | `allkeys-lru`  | Evicts the least recently used keys. Best for caches                           |
   | `volatile-lru` | Evicts least recently used keys that have an expiry; keys without one are kept |
   | `allkeys-lfu`  | Evicts the least frequently used keys; keeps hot keys longer                   |
   | `volatile-ttl` | Evicts the keys closest to expiring first                                      |
   | `noeviction`   | Rejects writes with an out-of-memory error when full. Use for queues and locks |

6. Choose **Persistence**:
   * **AOF on**: every write is logged to disk and synced each second. Data survives restarts.
   * **AOF off**: fastest; data is lost when the cache restarts. Fine for pure caches.

7. Pick the **Region** closest to your app servers. The price is the same everywhere.

8. Check the **Summary** and select **Create** followed by the name (for example **Create sessions**).

**View as code** shows the same request as an API call.

## Check that it worked [#check-that-it-worked]

The database shows **Creating** and is **Running** in about a minute. Then open its **Connection** tab:
see [Connect to Redis](/en/data-storage/redis/connect-to-redis).

## Related [#related]

* [Connect to Redis](/en/data-storage/redis/connect-to-redis)
* [Trusted sources](/en/data-storage/redis/trusted-sources)
