---
title: "Deploy Redis HA"
description: "Redis HA cluster with colocated Sentinel and HAProxy entry point"
category: "Storage"
url: https://railway.com/deploy/redis-ha
---

# Deploy Redis HA

Redis HA cluster with colocated Sentinel and HAProxy entry point

**[Deploy Redis HA on Railway](https://railway.com/template/redis-ha)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/redis-ha/manifest.json

- **Creator:** Railway Templates
- **Category:** Storage
- **Total deploys:** 572

## Template content

### Redis HA https://cms.railway.com/media/haproxy-icon.svg

- **Image:** ghcr.io/railwayapp-templates/redis-ha/haproxy:3.2

### Redis-1 https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** ghcr.io/railwayapp-templates/redis-ha/redis-sentinel:8.4

### Redis-2 https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** ghcr.io/railwayapp-templates/redis-ha/redis-sentinel:8.4

### Redis-3 https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** ghcr.io/railwayapp-templates/redis-ha/redis-sentinel:8.4

## Documentation

# Redis HA

A highly available Redis cluster using:
- **Redis + Sentinel (colocated)** on each node (ports 6379 / 26379)
- **HAProxy** for client connections, routing writes to the node reporting `role:master`

## Architecture

- **Redis-1 (Primary)**: Current master (may change after failover)
- **Redis-2+ (Replicas)**: Streaming replicas that promote on primary loss
- **Redis HA (Edge)**: HAProxy entry point — use this for all client connections

Minimum 3 Redis nodes: Sentinel requires a majority to authorize failover, so a 2-node
cluster split-brains on a symmetric partition. 3 nodes (quorum 2) tolerate 1 node loss.

## Connecting

Use the `REDIS_URL` or `REDIS_PUBLIC_URL` from the "Redis HA" (HAProxy) service.
Do not connect directly to individual Redis nodes.

## Scaling

- **Replicas**: even counts (2/4/6/8) via the cluster overview — the cluster
  totals 3, 5, 7 or 9 Redis nodes, keeping the colocated-Sentinel voter count odd
- Sentinel quorum is `ceil(nodes/2)` - defaults are sized for 3 total nodes


## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.

Open this page in a browser: https://railway.com/deploy/redis-ha
