Deploying Redis Cloud
Managed Redis by Redis Inc with active-active, modules, and multi-region.
PlatformsIntermediate
Why
Redis Cloud is the official managed Redis by Redis Inc. It supports RediSearch, RedisJSON, RedisGraph, and active-active multi-region for 99.999% uptime.
When
Use Redis Cloud for production Redis with modules, HA, and support. Avoid for cost-sensitive (use Upstash/self-hosted).
How
1. Create — app.redislabs.com → New Database
2. Plan — free 30MB, or paid with HA + modules
3. Modules — RediSearch, RedisJSON, RedisBloom, RedisGraph
4. Active-active — multi-region, write to any region
5. Connect — host + port + password, or TLS
6. Backup — automatic point-in-time recovery
7. Monitor — RedisInsight for query analysis
Example
import { createClient } from "redis";
const client = createClient({
url: "rediss://default:password@host:port", // TLS
socket: { tls: true, rejectUnauthorized: true },
});
await client.connect();
await client.set("key", "value");
const value = await client.get("key");
// RediSearch — full text search
await client.ftCreate("idx", { schema: { title: "TEXT", body: "TEXT" } });
await client.ftSearch("idx", "hello world");
Common Problems
- ⚠Free tier 30MB limit — too small for production, upgrade to paid
- ⚠Module not enabled — add modules at DB creation, can't add later
- ⚠Configuration drift between environments — use infrastructure-as-code (Terraform/Pulumi) to keep dev/staging/prod identical
Best Practices
- ✓Use active-active for multi-region — write to any region, auto-sync
- ✓Enable modules at creation — RediSearch for search, RedisJSON for docs
- ✓Set up health checks and graceful shutdown — handle SIGTERM to drain in-flight requests before exit