Rediredge: Simplifying Domain Redirects with a Go and Next.js Stack
Share this article
For developers and operations teams, domain redirects represent a recurring pain point—caught between complex cloud configurations and disruptive developer requests. Traditional approaches force teams into tedious AWS console navigation or create workflow bottlenecks when non-technical colleagues need simple redirects. Leonardo Trapani's recently open-sourced Rediredge tackles this friction head-on with an elegant technical solution.
The Redirect Dilemma
Most organizations face two problematic paths:
1. The Cloud Configuration Maze: Endless clicks through AWS services (CloudFront, Certificate Manager) requiring DNS changes and YAML tweaks
2. The Developer Dependency: Marketing teams stuck waiting days for engineering resources to update configuration files
"Redirects are a product concern, not a DevOps ticket," Trapani asserts. His solution? A self-hostable system where non-technical users manage redirects through a dashboard while engineers get lightweight infrastructure.
Architecture Breakdown
Rediredge employs a clean separation of concerns:
Control Plane (Next.js):
- Intuitive dashboard for domain/redirect management
- Persists rules to PostgreSQL
- Implements authentication
Data Plane (Go):
- Stateless redirector handling TLS via autocert (ACME)
- Reads rules from Redis
- Returns 30x responses in sub-millisecond time
// Simplified architecture flow
Client → Go Redirector (TLS + Redis HGET) → 30x Response
↓
Redis (read model)
↑
Sync Worker ← Postgres ← Dashboard
The magic lies in Redis optimization—each redirect rule stores all necessary metadata for instant lookup without parsing:
{
"redirect:example.com:cal": {
"to": "https://calendly.com/acme",
"status": 308,
"preservePath": false,
"preserveQuery": true,
"version": 3
}
}
Technical Innovations
Outbox Pattern Implementation:
- All dashboard changes land in PostgreSQL outbox table
- Sync worker applies updates to Redis idempotently
- Ensures consistency and durability during failures
Zero-Cold-Start Performance:
- Go's native compilation enables instant responses
- Eliminates Lambda-style cold starts affecting serverless solutions
Automatic HTTPS:
- Built-in ACME (HTTP-01) support via autocert
- No reverse proxy required
Deployment Flexibility
# Self-hosted Docker Compose example
services:
redirector:
image: ghcr.io/leonardotrapani/rediredge-redirector
ports:
- "80:5498"
- "443:5499"
environment:
- REDIS_URL=redis://redis:6379
redis:
image: redis:alpine
Teams choose between:
- Hosted Service: Fully managed infrastructure
- Self-Hosted: Single-command deployment with persistent control plane
Unlike generic URL shorteners, Rediredge preserves brand authority by hosting redirects on your domains—critical for SEO and user trust. As Trapani notes: "Search engines see yourcompany.com, not bit.ly."
The project's pre-alpha release on GitHub invites community collaboration, potentially reshaping how teams approach what Trapani calls "invisible infrastructure." By treating redirects as product-level concerns rather than infrastructure tasks, Rediredge exemplifies the growing trend of developer-focused solutions that eliminate operational tax.