Granular Routing on Fly.io

Does your load balancer point traffic at a server and hope for the best? Most do. Instead Fly.io lets you control exactly where each request goes. Which region, which Machine, and even which app. Route writes to your primary database, reads to replicas, or bounce requests between apps like some kind of software orchestral conductor.

Dive into the docs!
Fly-Replay Header

The Fly-Replay Header: Your Remote Control

Need to send a request somewhere specific? Simply set the fly-replay header in your response! We'll pick up that request and replay it to whatever region, Machine, or app you specify. It's like a forwarding address for HTTP requests, except it actually works.

  • Route to specific regions (us, eu, apac)
  • Target individual Machine instances
  • Forward to other apps in your org
  • Handles requests up to 1MB
  • Tracks replay metadata automatically
  • Supports JSON for complex routing

You Don't Have To Be A Cloud Guru to Build Multi-Region Apps

Deploy your app globally, but keep your database in one place. When a write request hits Tokyo, replay it to Virginia where your primary database lives. Reads stay local, writes go where they need to. No eventually-consistent hand-waving, no "just use CRDTs bro." Just working software.

Database writes to primary: Route POST/PUT/DELETE to your write region automatically
Reads stay fast: Serve from read replicas in every region
Geographic aliases: Use "us", "eu", "apac" instead of memorizing airport codes
Fallback routing: Prefer a region, but use another if it's unavailable
Multi-Region Routing

Cross-App Routing: The Platform Builder's Secret Weapon

Want to build a routing layer? A function-as-a-service platform? A custom API gateway? Route requests between apps in your organization like they're all part of one big application. Build platforms on platforms. It's turtles all the way down.

Route between apps in your organization
Build custom routing layers and API gateways
Create FaaS architectures on your own terms
Implement sticky sessions across machines
Private network routing within your org

Route Requests Like You Mean It

Granular Routing Control

Traditional load balancers make decisions for you. Fly.io gives you the controls and gets out of your way. The only limit is your imagination (and the 1MB request size limit).

Get Started