Deploy Fast Relay

Fast HTTP proxy with Gist config, smart routing, and custom responses

Deploy Fast Relay

fast-relay

supra126/fast-relay

Just deployed

Deploy and Host Fast Relay on Railway

Fast Relay is a lightweight, production-ready HTTP proxy router that simplifies microservice routing, webhook forwarding, and API aggregation. Configure routes with JSON, update dynamically via GitHub Gist, and deploy in seconds on Railway.

About Hosting Fast Relay

Hosting Fast Relay on Railway gives you a production-ready proxy server in minutes. The service automatically loads route configurations from GitHub Gist, enabling zero-downtime updates without redeployment. With support for both append and query parameter routing modes, you can seamlessly forward requests to multiple backend services. The built-in auto-restart feature detects configuration changes and updates your routes automatically, making it ideal for dynamic environments where routes need frequent updates.

Fast Relay handles JSON, form-data, file uploads, and text formats automatically. It includes enterprise-grade security with SSRF protection, optional API authentication, rate limiting, and token masking—keeping your infrastructure secure from day one. Return custom responses immediately while forwarding requests asynchronously, perfect for webhook receivers that need immediate acknowledgment without waiting for processing to complete.

Common Use Cases

  • Webhook Forwarding - Route webhooks from Stripe, GitHub, or any external service with immediate custom responses while processing asynchronously in the background
  • API Aggregation - Combine multiple microservices under one endpoint with flexible path routing and unified authentication
  • File Upload Proxy - Handle form submissions and file uploads, forwarding multipart/form-data to storage or processing services
  • A/B Testing - Route traffic to different backend versions based on URL patterns for testing and experimentation
  • Legacy API Migration - Gradually migrate APIs by routing specific paths to new services while maintaining backward compatibility
  • Development/Staging Router - Proxy local development traffic to staging or production environments with path-based routing

Dependencies for Fast Relay Hosting

  • Node.js 18+ - Runtime environment (automatically provided by Railway)
  • Fastify 5.x - High-performance web framework with plugins:
    • @fastify/http-proxy - Proxy middleware for append mode
    • @fastify/formbody - Form URL-encoded body parser
    • @fastify/multipart - File upload and multipart form-data support
    • @fastify/rate-limit - Rate limiting and DDoS protection
    • @fastify/cors - Cross-origin resource sharing support
  • TypeScript - Type-safe development and production builds
  • GitHub Gist (Optional) - For dynamic configuration updates without redeployment
  • Backend APIs - Target services you want to proxy requests to

Deployment Dependencies

Implementation Details

Fast Relay uses Fastify for high-performance request handling and supports two routing modes:

Append Mode - Direct path forwarding:

/api/v1/users/123 → https://api.example.com/v1/users/123

Query Mode - Path as query parameter:

/webhook/notify → https://webhooks.example.com?path=/notify

Custom Response - Immediate acknowledgment with async forwarding:

{
  "source": "/webhook/*",
  "target": "https://webhooks.example.com",
  "responseMode": "custom",
  "customResponse": {
    "status": 200,
    "body": "OK"
  }
}

Configure routes via routes.json or GitHub Gist with automatic sync every 5 minutes (configurable). The service detects configuration changes and automatically restarts to apply updates, enabling true continuous deployment for your proxy infrastructure.

Security & Performance:

  • Built-in SSRF Protection - Automatically validates and blocks dangerous target URLs (private IPs, localhost, cloud metadata endpoints)
  • Optional Authentication - Support for API key authentication with Bearer tokens, X-API-Key headers, or query parameters
  • Rate Limiting - Configurable request throttling (default: 100 requests/minute) with automatic headers
  • CORS Configuration - Flexible cross-origin support with multiple allowed origins
  • Multi-Format Support - Handles JSON, form-data, file uploads, and text formats automatically
  • Request Size Limits - Configurable body size limits (default: 10MB, increased to support file uploads)
  • Production Optimizations - JSON logging in production mode for better performance and parsing

Why Deploy Fast Relay on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Fast Relay on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

Railway's automatic restart and health check features work seamlessly with Fast Relay's Gist-based configuration system, enabling true zero-downtime configuration updates for your proxy infrastructure. Deploy in seconds with one-click deployment from GitHub, and let Railway handle dependency installation, TypeScript compilation, server startup, and auto-restart on crashes.


Template Content

More templates in this category

View Template
N8N Main + Worker
Deploy and Host N8N with Inactive worker.

View Template
Postgres S3 backups
A simple NodeJS app to back up your PostgreSQL database to S3 via a cron

View Template
Prefect (Open-Source Workflow Orchestration Platform)
Prefect (ETL & Automation alternative to Airflow) Self Host [Oct ’25]