> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shiftlabs.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Monitor Redis server health, performance, and connected clients

The Redis Overview dashboard provides real-time monitoring of your Redis servers. View performance metrics, memory usage, key distribution, and connected clients from a single page.

## Key Concepts

<CardGroup cols={2}>
  <Card title="Connection" icon="plug">
    A configured Redis server endpoint. Supports standalone, Sentinel, and cluster deployments.
  </Card>

  <Card title="Database" icon="database">
    Redis organizes keys into numbered databases (0-15 by default). Each database is isolated.
  </Card>

  <Card title="Client" icon="user">
    An active connection to Redis. Includes your application connections and admin tools.
  </Card>

  <Card title="Memory" icon="microchip">
    Redis stores all data in memory. Monitor usage to prevent out-of-memory conditions.
  </Card>
</CardGroup>

## Required Permissions

| Action                  | Permission                              |
| ----------------------- | --------------------------------------- |
| View overview dashboard | `iam:project:infrastructure:redis:read` |
| View connected clients  | `iam:project:infrastructure:redis:read` |

## Connection Types

| Type           | Description                                                               |
| -------------- | ------------------------------------------------------------------------- |
| **Standalone** | Single Redis server. Simple setup for development or small deployments.   |
| **Sentinel**   | High availability setup with automatic failover. Master-replica topology. |
| **Cluster**    | Distributed Redis across multiple nodes with automatic sharding.          |

## How to Select a Connection

<Steps>
  <Step title="Open Overview Page">
    Navigate to Redis > Overview.
  </Step>

  <Step title="Choose Connection">
    Use the connection dropdown to select from your configured Redis connections.
  </Step>

  <Step title="View Dashboard">
    The dashboard loads automatically with server statistics and connected clients.
  </Step>
</Steps>

<Info>
  Your last selected connection is remembered. The page will automatically reconnect on your next visit.
</Info>

## How to Refresh Dashboard Data

<Steps>
  <Step title="Click Refresh">
    Click the refresh button in the toolbar to reload all dashboard data.
  </Step>

  <Step title="View Updated Stats">
    All metrics, memory stats, and client list update with current values.
  </Step>
</Steps>

## Understanding Dashboard Metrics

### Server Information

| Metric         | Description                         |
| -------------- | ----------------------------------- |
| **Version**    | Redis server version (e.g., 7.2.0)  |
| **Uptime**     | Time since Redis server started     |
| **Total Keys** | Number of keys across all databases |
| **Clients**    | Currently connected clients         |
| **Ops/sec**    | Instantaneous operations per second |
| **Memory**     | Current memory usage                |

### Memory Usage

| Metric                  | Description                             |
| ----------------------- | --------------------------------------- |
| **Used Memory**         | Current memory allocated by Redis       |
| **Max Memory**          | Configured memory limit (0 = unlimited) |
| **Peak Memory**         | Highest memory usage since server start |
| **Fragmentation Ratio** | Memory fragmentation level              |
| **Expiring Keys**       | Keys with TTL set                       |

<Warning>
  If memory usage approaches max memory, Redis may evict keys or reject writes depending on the eviction policy.
</Warning>

### Fragmentation Ratio

| Ratio         | Meaning                   | Action                    |
| ------------- | ------------------------- | ------------------------- |
| **\< 1.0**    | Memory underutilized      | Normal for small datasets |
| **1.0 - 1.5** | Healthy fragmentation     | No action needed          |
| **> 1.5**     | High fragmentation        | Consider restarting Redis |
| **> 2.0**     | Significant fragmentation | Investigate memory issues |

### Performance Statistics

| Metric                   | Description                               |
| ------------------------ | ----------------------------------------- |
| **Total Commands**       | Commands processed since server start     |
| **Total Connections**    | Connections received since start          |
| **Rejected Connections** | Connections refused (max clients reached) |
| **Blocked Clients**      | Clients waiting on blocking commands      |

<Info>
  Blocked clients are normal when using commands like `BLPOP`, `BRPOP`, or `XREAD`. Persistent high blocked counts may indicate slow consumers.
</Info>

## Understanding Key Distribution

The dashboard shows key counts by data type:

| Type           | Description              | Use Case                        |
| -------------- | ------------------------ | ------------------------------- |
| **String**     | Simple key-value pairs   | Caching, counters, session data |
| **Hash**       | Field-value maps         | Objects, user profiles          |
| **List**       | Ordered collections      | Queues, recent items            |
| **Set**        | Unique unordered members | Tags, unique visitors           |
| **Sorted Set** | Scored members           | Leaderboards, priority queues   |
| **Stream**     | Append-only log          | Event sourcing, messaging       |

## Understanding Replication

| Field                | Description                                     |
| -------------------- | ----------------------------------------------- |
| **Role**             | Master (primary) or Slave (replica)             |
| **Connected Slaves** | Number of replicas connected to this master     |
| **AOF Enabled**      | Append-Only File persistence status             |
| **RDB Enabled**      | Point-in-time snapshot persistence status       |
| **Mode**             | Deployment mode (standalone, sentinel, cluster) |

### Persistence Types

| Type     | Description                                                               |
| -------- | ------------------------------------------------------------------------- |
| **RDB**  | Periodic snapshots. Fast recovery, potential data loss between snapshots. |
| **AOF**  | Log every write operation. Slower but more durable.                       |
| **Both** | RDB for fast recovery, AOF for durability. Recommended for production.    |

## How to View Connected Clients

<Steps>
  <Step title="Scroll to Connected Clients">
    The client list appears at the bottom of the dashboard.
  </Step>

  <Step title="Search Clients">
    Use the search box to filter by address, name, or command.
  </Step>

  <Step title="Review Client Details">
    Each client shows address, name, database, current command, age, and idle time.
  </Step>
</Steps>

### Client Flags

| Flag  | Meaning                        |
| ----- | ------------------------------ |
| **N** | Normal client                  |
| **M** | Master in MONITOR mode         |
| **S** | Slave connection               |
| **O** | Client in MULTI/EXEC context   |
| **x** | Client in MULTI/EXEC (aborted) |
| **b** | Waiting on blocking command    |
| **t** | Watched keys modified          |
| **R** | Client in readonly mode        |
| **P** | Pub/Sub subscriber             |

## Related Pages

| Page              | Description                                  |
| ----------------- | -------------------------------------------- |
| **Key Browser**   | Browse, search, and manage Redis keys        |
| **Slow Log**      | Analyze slow commands for performance tuning |
| **Configuration** | View and modify Redis configuration          |
| **CLI**           | Execute Redis commands directly              |

## Troubleshooting

<AccordionGroup>
  <Accordion title="No connection available" icon="circle-question">
    * No active Redis connections are configured
    * Navigate to Settings > Integrations to add a Redis connection
    * Verify connection settings (host, port, authentication)
  </Accordion>

  <Accordion title="Connection failed" icon="circle-question">
    * Verify Redis server is running
    * Check network connectivity to the Redis host
    * Confirm authentication credentials are correct
    * Ensure TLS settings match server configuration
  </Accordion>

  <Accordion title="High memory usage" icon="circle-question">
    * Check for keys without TTL that should expire
    * Review max memory policy (eviction settings)
    * Consider enabling memory analysis with `MEMORY DOCTOR`
    * Check for memory fragmentation
  </Accordion>

  <Accordion title="High fragmentation ratio" icon="circle-question">
    * Restart Redis to defragment memory
    * Enable active defragmentation in Redis 4+
    * Check for patterns causing fragmentation (large key deletions)
    * Consider memory allocator tuning
  </Accordion>

  <Accordion title="Many rejected connections" icon="circle-question">
    * Check `maxclients` configuration
    * Review if clients are closing connections properly
    * Ensure connection pooling is used in applications
    * Check for connection leaks
  </Accordion>

  <Accordion title="Dashboard not loading" icon="circle-question">
    * Verify the selected connection is active
    * Check if the Redis server allows INFO command
    * Ensure your user has read permission
    * Try refreshing the page
  </Accordion>
</AccordionGroup>

## FAQ

<AccordionGroup>
  <Accordion title="What's the difference between used and max memory?">
    **Used Memory** is what Redis has allocated for data. **Max Memory** is the configured limit (0 means no limit). When used memory reaches max memory, Redis applies the eviction policy to free space.
  </Accordion>

  <Accordion title="Why is peak memory higher than current memory?">
    Peak memory shows the highest memory usage since server start. Memory decreases when keys expire or are deleted. Large temporary operations can spike peak memory.
  </Accordion>

  <Accordion title="What does ops/sec measure?">
    Operations per second measures the instantaneous rate of Redis commands being processed. This includes all operations: reads, writes, and admin commands.
  </Accordion>

  <Accordion title="How are databases different from each other?">
    Each database (0-15) is a separate keyspace. Keys in database 0 are independent from keys in database 1. Databases share the same Redis instance and memory.
  </Accordion>

  <Accordion title="What causes blocked clients?">
    Clients become blocked when using blocking commands like `BLPOP`, `BRPOP`, `XREAD`, or `WAIT`. They remain blocked until data becomes available or timeout expires.
  </Accordion>

  <Accordion title="Why can't I see all connected clients?">
    The client list is paginated for performance. Use search to find specific clients by address or name. Very large deployments may have thousands of connections.
  </Accordion>

  <Accordion title="What is AOF vs RDB persistence?">
    **RDB** creates point-in-time snapshots at intervals. **AOF** logs every write operation. RDB is faster for recovery; AOF provides better durability. Production systems often use both.
  </Accordion>

  <Accordion title="How do I know if replication is healthy?">
    For a master, check that expected replicas appear in "Connected Slaves". For a replica, the role should show "slave" with link status "up". Replication lag should be minimal.
  </Accordion>
</AccordionGroup>

## Best Practices

### Regular Monitoring

* Check memory usage trends before reaching limits
* Monitor rejected connections to detect capacity issues
* Track ops/sec during peak hours for capacity planning
* Review fragmentation ratio periodically

### Memory Management

* Set appropriate `maxmemory` limits in production
* Configure eviction policies based on your use case
* Use TTL on cache keys to prevent unbounded growth
* Monitor expiring keys count

### Connection Management

* Use connection pooling in applications
* Set appropriate connection timeouts
* Close idle connections to free resources
* Monitor client count during deployments

### Performance Tuning

* Review slow log for optimization opportunities
* Check key distribution for hot spots
* Consider clustering for high-throughput workloads
* Monitor blocked clients for queue processing issues
