Redis cache monitoring setup showing application health endpoint checking cache connectivity
# website monitoring

Monitoring Redis Cache Availability

Redis is used by millions of web applications as a cache, session store, message broker, and real-time data store. When Redis goes down, the impact depends on how your application handles cache failures — it can range from a minor performance hit to a complete application outage.

How Redis Failures Affect Applications

Redis failures manifest differently depending on usage:

Session store: If sessions are stored in Redis and Redis goes down, all logged-in users are logged out. New sessions can't be created — login is broken.

Cache layer: If Redis fails and your application falls back gracefully to the database, performance degrades but the app continues working (slower). If there's no fallback, requests fail.

Job queue (Sidekiq, Bull, Celery): Background job processing stops. Jobs accumulate in the queue but aren't processed until Redis recovers.

Rate limiting: If rate limiting uses Redis, the rate limiter may fail open (allowing all traffic) or fail closed (blocking all traffic) depending on implementation.

Pub/Sub: Real-time features (notifications, live updates) stop functioning.

Monitoring Redis Through Your Application

The most practical approach: include a Redis health check in your application's health endpoint.

Node.js (ioredis)

const redis = require('ioredis');
const client = new redis(REDIS_URL);

app.get('/health', async (req, res) => {
    const health = { status: 'ok' };
    
    try {
        await client.ping();
        health.redis = 'ok';
    } catch (error) {
        health.redis = 'error';
        health.status = 'degraded';
    }
    
    res.status(health.status === 'ok' ? 200 : 503).json(health);
});

Python (redis-py)

import redis

r = redis.Redis.from_url(REDIS_URL)

@app.route('/health')
def health():
    health = {'status': 'ok'}
    try:
        r.ping()
        health['redis'] = 'ok'
    except redis.ConnectionError:
        health['redis'] = 'error'
        health['status'] = 'degraded'
    
    return jsonify(health), 200 if health['status'] == 'ok' else 503

Laravel (PHP)

Route::get('/health', function () {
    $health = ['status' => 'ok'];
    
    try {
        Redis::ping();
        $health['redis'] = 'ok';
    } catch (\Exception $e) {
        $health['redis'] = 'error';
        $health['status'] = 'degraded';
    }
    
    return response()->json($health, $health['status'] === 'ok' ? 200 : 503);
});

Monitor https://yourapp.com/health — it returns 503 if Redis is unavailable, triggering your uptime alert.

Port Monitoring for Redis

If your Redis instance is network-accessible, set up port monitoring on port 6379:

Monitor type: Port
Host: your-redis-host.com
Port: 6379
Interval: 1 minute

Security note: Redis should NOT be exposed to the public internet. Port monitoring works when the monitoring service can reach Redis (internal network, VPN, or monitoring agent). If Redis is inside a private network, monitor through your application health endpoint instead.

For managed Redis services (ElastiCache, Redis Cloud, Upstash), check their status pages:

Graceful Degradation for Redis Failures

Design your application to handle Redis failures gracefully:

// Cache-aside pattern with fallback
async function getCachedData(key) {
    try {
        const cached = await redis.get(key);
        if (cached) return JSON.parse(cached);
    } catch (e) {
        // Redis is unavailable, fall through to database
        console.error('Redis unavailable, falling back to database:', e.message);
    }
    
    // Fetch from database
    const data = await db.query('SELECT ...');
    
    // Try to cache (may fail if Redis is still down)
    try {
        await redis.setex(key, 3600, JSON.stringify(data));
    } catch (e) {
        // Ignore cache write failure
    }
    
    return data;
}

With graceful degradation, Redis failure causes performance degradation rather than complete outage.

Heartbeat Monitoring for Redis-Backed Workers

For applications using Redis as a job queue (Sidekiq, Bull, Celery):

# Sidekiq worker with heartbeat
class ProcessOrdersWorker
    include Sidekiq::Worker
    
    def perform
        # Process jobs
        Order.pending.each { |o| process(o) }
        
        # Ping heartbeat monitor
        URI.open("https://monitoring-url/ping/YOUR_TOKEN")
    end
end

If the worker stops processing (because Redis is down or the worker crashed), the heartbeat misses its window and you receive an alert. See heartbeat monitoring.

Redis Memory Monitoring

Redis has a configured maxmemory limit. When it's reached, Redis uses an eviction policy (like allkeys-lru) to free space. If eviction is too aggressive, you lose cached data; if there's no eviction policy and memory is full, write commands fail.

Monitor Redis memory usage:

redis-cli INFO memory | grep used_memory_human

Set alerts at 80% memory utilisation to give time to investigate before memory pressure causes issues.


Monitor your applications that depend on Redis with health endpoint uptime checks at Domain Monitor.

More posts

What Is Generative AI? How It Works and What It Creates

Generative AI creates new content — text, images, code, and more. This guide explains how it works, what tools are available, and where it's genuinely useful versus overhyped.

Read more
What Is Cursor AI? The AI Code Editor Explained

Cursor AI is an AI-powered code editor built on VS Code. Learn what it does, how it works, and whether it's the right tool for your development workflow.

Read more
What Is Claude Opus? Anthropic's Most Powerful Model Explained

Claude Opus is Anthropic's most capable AI model, built for complex reasoning and demanding tasks. Learn what it does, how it compares, and when to use it.

Read more

Subscribe to our PRO plan.

Looking to monitor your website and domains? Join our platform and start today.