How to Monitor Upstash Redis with Vigilmon
Upstash Redis is a serverless Redis solution popular with Next.js, Remix, and edge-deployed applications. It's pay-per-request, globally distributed, and dead simple to integrate — which is exactly why so many developers
Upstash Redis is a serverless Redis solution popular with Next.js, Remix, and edge-deployed applications. It's pay-per-request, globally distributed, and dead simple to integrate — which is exactly why so many developers rely on it for caching, rate limiting, session management, and queues. But serverless doesn't mean failure-proof.
This guide shows you how to set up external monitoring for your Upstash Redis-dependent applications using Vigilmon.
Why Monitor Upstash Redis Availability?
Upstash has excellent uptime, but your application's dependency on it creates a failure surface. Consider what breaks if Redis becomes unavailable:
- Caching layer fails: Requests fall through to your database, causing latency spikes or overload
- Rate limiting stops working: API endpoints become unprotected
- Session storage fails: Users get logged out unexpectedly
- Queue processing stops: Background jobs don't get processed
You can't monitor Upstash directly from the outside (no public TCP endpoint to ping), but you can monitor your application's Redis-dependent operations through a health check endpoint.
Setting Up Upstash Redis Monitoring with Vigilmon
Step 1: Add a Redis Health Check Endpoint
Create an endpoint in your application that performs a lightweight Redis operation and returns its status.
Next.js App Router example:
// app/api/health/redis/route.ts
import { Redis } from '@upstash/redis';
const redis = Redis.fromEnv();
export async function GET() {
try {
const start = Date.now();
await redis.ping();
const latency = Date.now() - start;
return Response.json({
status: 'healthy',
latency_ms: latency,
provider: 'upstash'
}, { status: 200 });
} catch (error) {
return Response.json({
status: 'unhealthy',
error: error instanceof Error ? error.message : 'Unknown error'
}, { status: 503 });
}
}
Remix / Node.js example:
import { Redis } from '@upstash/redis';
const redis = Redis.fromEnv();
export const loader = async () => {
try {
await redis.ping();
return new Response(JSON.stringify({ status: 'healthy' }), {
status: 200,
headers: { 'Content-Type': 'application/json' }
});
} catch {
return new Response(JSON.stringify({ status: 'unhealthy' }), {
status: 503,
headers: { 'Content-Type': 'application/json' }
});
}
};
The ping() command is minimal — it sends a PING command to Redis and expects a PONG. It's the standard way to verify connectivity without side effects.
Step 2: Sign Up for Vigilmon
Go to vigilmon.online. The free tier gives you 10 monitors with 3-minute check intervals — no credit card required.
Step 3: Add an HTTP Monitor
- In the Vigilmon dashboard, click Add Monitor
- Select HTTP monitor type
- Enter your Redis health URL:
https://yourapp.com/api/health/redis - Set expected status code: 200
- Enable multi-region checks — Vigilmon checks from US, EU, and AP
- Set your check interval (3 min on free tier; lower on paid plans from $6/month)
Step 4: Add a Monitor for Your App's Main Endpoint
Add a second monitor targeting your main application URL. This gives you two signals:
- Redis health monitor fails, main monitor passes: Redis is down, app partially degraded
- Both monitors fail: Full application outage
This distinction helps you diagnose incidents faster.
Step 5: Set Up Alerts
Configure alert channels in the Vigilmon dashboard:
- Slack: Post to your team's #incidents channel
- Discord: Notify your dev server
- Email: Personal notification
- PagerDuty: For on-call escalation
- Webhooks: Trigger automated responses
Key Metrics to Track
| Signal | What It Means |
|---|---|
| Redis health endpoint returns 503 | Upstash connectivity issue |
| Increased response time on Redis health check | High Redis latency, possible region issue |
| Main app endpoint slow | Redis cache miss storm due to connectivity |
Alert Configuration Tips
Confirm from multiple regions: Vigilmon can require 2+ regions to confirm a failure before alerting. Since Upstash is globally distributed, a single-region blip may not affect all your users.
Response time alerting: Set a threshold (e.g., if Redis PING takes > 500ms, alert). High latency on a normally fast PING command signals a problem before full failure.
Separate monitors per Upstash database: If you use multiple Upstash databases (e.g., one for caching, one for rate limiting), consider separate health endpoints and monitors for each.
Heartbeat Monitors for Upstash-Powered Queues
If you use Upstash Redis as a queue (e.g., with QStash or a custom queue implementation), use Vigilmon's heartbeat monitor to verify your consumer workers are processing jobs. Your worker pings a unique Vigilmon URL after each successful batch. If pings stop arriving, you're alerted immediately.
Pairing Vigilmon with Upstash's Own Metrics
Upstash's console shows you Redis metrics like commands/second, memory usage, and connection count. Vigilmon complements this with external availability monitoring — the user-facing perspective that Upstash's internal metrics can't provide.
Use both:
- Upstash metrics for capacity planning and performance tuning
- Vigilmon for "is my app's Redis integration actually working right now?"
Get Started
Don't wait for users to report that your rate limiting stopped working or sessions are dropping. Set up monitoring at vigilmon.online in under 5 minutes — it's free to start.
With Vigilmon's 10 free monitors and paid plans from just $6/month, you can cover your Upstash Redis integration and every other critical service in your stack.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.