Home Pricing
Documentation Blog About
Login Start free
Back to Blog

How we reduced cold starts by 90% with edge computing

A deep dive into our new edge runtime architecture and how it dramatically improves performance for serverless functions.

Edge Computing

Cold starts have been the Achilles' heel of serverless computing since its inception. Today, we're excited to share how we've tackled this challenge head-on, achieving a 90% reduction in cold start times.

The Problem with Cold Starts

When a serverless function hasn't been invoked recently, the cloud provider needs to spin up a new instance. This process—known as a "cold start"—can add significant latency to your application, sometimes taking several seconds.

For user-facing applications, this delay can be the difference between a smooth experience and frustrated users hitting the back button.

"Every 100ms of latency costs Amazon 1% in sales."

— Greg Linden, Amazon

Our Approach: Edge-First Architecture

Instead of running functions in centralized data centers, we've built a global edge network that keeps your code warm and ready at over 200 locations worldwide.

Key Innovations

  • Predictive Warming: Our ML models analyze traffic patterns to pre-warm functions before requests arrive.
  • Lightweight Runtime: We built a custom V8 isolate-based runtime that initializes in under 5ms.
  • Smart Routing: Requests are automatically routed to the nearest warm instance.

The Results

After rolling out these changes to our production infrastructure, we measured the following improvements:

90% Reduction in cold starts
< 50ms P99 latency
200+ Edge locations

Code Example

Here's how simple it is to deploy an edge function with Shipyard:

// api/hello.js
export default function handler(req) {
  return new Response(
    JSON.stringify({ message: "Hello from the edge!" }),
    { headers: { "content-type": "application/json" } }
  );
}

// Deploy with: shipyard deploy

What's Next

We're continuing to push the boundaries of serverless performance. In the coming months, we'll be introducing:

  1. WebAssembly support for even faster execution
  2. Persistent connections for real-time applications
  3. Enhanced observability with distributed tracing

Stay tuned for more updates, and as always, we'd love to hear your feedback. Join our Discord community or reach out on Twitter.

Alex Chen

Lead Engineer at Shipyard

Alex leads the infrastructure team at Shipyard, focusing on performance optimization and distributed systems.