When we started DeployStack, we knew that edge deployment was the future. But building a global edge network from scratch? That seemed like a multi-year, multi-million dollar undertaking. Here is how we did it in six months.
The Problem: Latency Kills Conversions
Every 100ms of latency costs 1% in revenue. For a global SaaS product, serving from a single US region means users in Asia and Europe experience 200-400ms of unnecessary round-trip time. We needed to fix this.
Architecture Decisions
We made three key architectural decisions early on:
- Anycast routing -- Every PoP shares the same IP addresses, and BGP routes users to the nearest one automatically
- Immutable deployments -- Each deployment is a complete, self-contained artifact distributed to all PoPs simultaneously
- V8 isolates for edge compute -- Instead of containers, we use V8 isolates for sub-millisecond cold starts
// Edge function example
export default {
async fetch(request, env) {
const url = new URL(request.url);
const country = request.headers.get('cf-ipcountry');
// Route to nearest origin
const origin = env.ORIGINS[country] || env.ORIGINS.default;
return fetch(origin + url.pathname, request);
}
}
The Results
After six months of building:
- 47 PoPs across 6 continents
- p50 latency: 23ms globally (down from 180ms)
- 99.99% uptime since launch
- Sub-second deploys with incremental propagation
"The best infrastructure is the kind your users never think about. They just notice everything feels fast."
What's Next
We are working on edge databases -- bringing data closer to compute so your entire application runs at the edge, not just the routing layer. Stay tuned for our announcement in Q1 2025.
Want to deploy to the edge?
Start deploying to 47 global PoPs today. Free tier available.
Start Deploying Free