Skip to content
← Back to Blog

Building a Sub-100ms Cloud IDE

Alex Chen
Alex Chen • Jan 5, 2025 • 10 min read
Cloud IDE architecture

When we started CodeForge, we had one non-negotiable requirement: the IDE must feel instant. Not "fast for a cloud app" instant. Actually instant. Sub-100ms from click to coding.

Most cloud IDEs take 5-30 seconds to spin up a workspace. We wanted to match the experience of opening a local editor. Here's how we did it.

The Architecture

Traditional cloud IDEs provision a new container for each workspace. This involves pulling images, mounting volumes, initializing the runtime, and establishing WebSocket connections. Each step adds latency.

We took a different approach: pre-warmed workspace pools.

Instead of creating environments on demand, we maintain pools of warm containers ready to serve. When a user clicks "New Project," they get an already-running environment instantly.

Three Key Innovations

1. Snapshot-Based Forking

We use copy-on-write filesystem snapshots to fork base environments. A new Python workspace doesn't install Python from scratch; it forks from a snapshot that already has Python, pip, and common packages ready.

2. Speculative Pre-loading

Our ML model predicts what workspace a user is likely to open next based on their history. We start warming that environment before they even click. For returning users, this brings effective startup time to under 30ms.

3. Edge-Proxied WebSockets

We established WebSocket endpoints at edge locations worldwide. The connection is established to the nearest edge, then proxied to the actual workspace. This shaves 50-200ms off the initial connection for users far from our data centers.

The Results

After these optimizations, our p50 workspace startup time is 47ms and p99 is 89ms. For comparison, that's faster than most websites load their homepage.

  • First click to cursor blinking: 47ms (p50)
  • Time to first keystroke: 89ms (p99)
  • Full environment ready: 120ms (p99)

What's Next

We're working on bringing the same instant experience to more complex environments (Docker Compose, Kubernetes) and exploring WebAssembly-based runtimes for even faster cold starts.

Learn more about CodeForge features →

Share: