# How Redis Ultra works

```json metadata
{
  "schema_version": 3,
  "title": "How Redis Ultra works",
  "description": "How Redis Ultra organizes your databases, and how to choose a type and size it.",
  "categories": ["docs","operate","ultra"],
  "tableOfContents": {"sections":[{"id":"the-building-blocks","title":"The building blocks"},{"id":"choose-a-database-type","title":"Choose a database type"},{"id":"redis-flex-tiering","title":"Redis Flex tiering"}]}

,
  "codeExamples": []
}
```


Redis Ultra runs your databases in a network in your account. Your apps and agents reach them from your own Amazon Web Services (AWS) account, for example over virtual private cloud (VPC) peering.

To see your cache, primary database, and agent context on one platform, and to choose and size a database, try the [interactive demo](https://redis.io/docs/latest/operate/ultra/concepts/interactive-demo).

![Your app or agent runs in a VPC in your AWS account. VPC peering connects it to a Redis Ultra network, which every project in your account shares. The network holds Redis databases for evictable, ephemeral state, and Redis Terra databases for a durable system of record. Each database has an endpoint.](https://redis.io/docs/latest/images/ultra/ultra-architecture.svg)

## The building blocks

- **Account**: your organization in Redis Ultra. It holds your projects, your networks, your users, and your payment method.
- **Project**: a group of databases. Every account has a default project, and you can add more. See [Projects](https://redis.io/docs/latest/operate/ultra/projects).
- **Network**: a cloud, a region, and a Classless Inter-Domain Routing (CIDR) block that your databases run in. Every project in the account shares it. See [Networks and VPC peering](https://redis.io/docs/latest/operate/ultra/networking).
- **Database**: a Redis or Redis Terra database. Each one has an endpoint that stays the same when you resize the database and through failover. See [Create and manage databases](https://redis.io/docs/latest/operate/ultra/databases).
- **VPC peering**: the connection between the network and a VPC in your AWS account. Your apps and agents use it to reach your databases from that VPC.
- **Redis Iris**: services that give your agents context, such as memory and approved answers. Your apps and agents use the Iris APIs for agent context and the Redis APIs for Redis and Redis Terra databases. See [Redis Iris](https://redis.io/docs/latest/develop/ai/context-engine).

## Choose a database type

One rule decides the type. If the data can be rebuilt from another source, choose Redis. If it can't, choose Redis Terra. You can't change a database's type after you create it.

| Workload | Type | Why |
|---|---|---|
| Cache in front of a slower database | Redis | A miss reloads the value from your database. |
| Session and token state | Redis | A lost session means the user signs in again. |
| Agent context from tools and APIs | Redis | The agent can call the tool or API again. |
| Real-time counters and leaderboards | Either | Redis if you can recount from an event log. Redis Terra if the counters are the only copy. |
| Queues and streams between services | Either | Redis if producers can resend lost work. Redis Terra if queued work can't be lost. |
| Agent long-term memory | Redis Terra | What the agent learned exists nowhere else. |
| System of record for your app | Redis Terra | There's no other copy to rebuild it from. |

The types also differ in consistency, durability, and replicas:

| | Redis | Redis Terra |
|---|---|---|
| Consistency | Eventual | Strong (for idempotent commands) |
| Durability | No | Yes |
| Replicas | 1 | 2 |
| Default memory architecture | In-memory | Flex (tiered memory) |
| Default dataset size | 1 GiB | 10 GiB |

## Redis Flex tiering

Redis Flex keeps frequently used data in RAM and the rest on solid-state drives (SSDs), so a database can hold more data than fits in RAM. The console calls this **Flex (tiered memory)**.

| Memory architecture | Dataset size | Data in RAM |
|---|---|---|
| **In-memory** | 1 GiB to 10 GiB | All of it |
| **Flex (tiered memory)** | 1 GiB to 100 GiB | Set by the performance tier |

For Flex, the performance tier sets how much of the dataset stays in RAM:

| Performance tier | Share of the dataset in RAM |
|---|---|
| **Standard** | 10% |
| **Enhanced** | 20% |
| **Extreme** | 40% |

For example, a 10 GiB Redis Terra database on **Enhanced** keeps about 2 GiB in RAM and the rest on SSD. You choose the performance tier when you create the database and can't change it later. You can change the dataset size. See [Change a database](https://redis.io/docs/latest/operate/ultra/databases#change-a-database).

