Skip to main content
Redis 7 is available as an on-demand service for caching, sessions, and message queues.

Install

instapod services add my-app --service redis --wait
Installation takes approximately 8–13 seconds.

Connection Details

instapod services creds my-app --service redis
FieldValue
Hostlocalhost
Port6379
Redis is configured without authentication by default since it only listens on localhost and is not accessible from outside the pod.

Connecting from Your Application

Node.js

const Redis = require('ioredis');
const redis = new Redis({ host: 'localhost', port: 6379 });

await redis.set('key', 'value');
const value = await redis.get('key');

Python

import redis

r = redis.Redis(host='localhost', port=6379)
r.set('key', 'value')
value = r.get('key')

PHP

$redis = new Redis();
$redis->connect('localhost', 6379);
$redis->set('key', 'value');
$value = $redis->get('key');

Command Line Access

SSH into your pod and use redis-cli:
instapod ssh my-app
redis-cli
127.0.0.1:6379> SET greeting "hello"
OK
127.0.0.1:6379> GET greeting
"hello"

Use Cases

  • Caching — Store frequently accessed data for fast retrieval
  • Sessions — Store user sessions (Express, Django, Laravel)
  • Queues — Use as a message broker with Bull, Celery, or Laravel Queues
  • Real-time — Pub/sub for real-time features
  • Rate limiting — Track request counts per IP/user