---
title: "Modal's serverless Servers"
description: "Modal Servers are a low-latency HTTP/WebSocket/gRPC serving primitive that cut p50 request latency from 39ms to 6ms versus Modal Web Functions by dropping platform-managed queueing and keeping network calls off the hot path."
url: "https://swe.quest/articles/modal-s-serverless-servers-c4c4d9aad435b2d6"
canonical: "https://modal.com/blog/serverless-servers"
source: "Modal"
published: "2026-06-25"
difficulty: "medium"
kind: "Case study"
reading_minutes: 10
tags: ["load-balancing","serverless","inference","rust","performance"]
---

# Modal's serverless Servers

A post on [Modal](https://swe.quest/sources/modal.md), published 2026-06-25, 10 min read, Case study. Original: [https://modal.com/blog/serverless-servers](https://modal.com/blog/serverless-servers)

## Summary

Modal Servers are a low-latency HTTP/WebSocket/gRPC serving primitive that cut p50 request latency from 39ms to 6ms versus Modal Web Functions by dropping platform-managed queueing and keeping network calls off the hot path. Requests flow through an AWS NLB, an Envoy edge proxy that terminates TLS and normalizes traffic to multiplexed HTTP/2, and fprs, a stateless Rust proxy built on Cloudflare's pingora. fprs maps domains to replicas using an in-memory cache reconciled from Spanner change streams, and it also handles autoscaling signals, proxy-level auth and traffic mirroring. The tradeoff is UDP-like: with no replica available, clients get a 503, and queueing and load shedding are pushed to the application in exchange for minimal routing overhead.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Rust](https://swe.quest/tags/rust.md) (Languages)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- HTTP/2 multiplexing
- reverse proxies and L4/L7 load balancing ([easy posts on Load balancing](https://swe.quest/tags/load-balancing.md?difficulty=easy))
- autoscaling basics ([easy posts on Capacity planning](https://swe.quest/tags/capacity-planning.md?difficulty=easy))

## Keywords

Modal, Envoy, pingora, Spanner, Tokio, HTTP/2, AWS NLB, fprs

## Related posts

- [Lambda on hard mode: Inside Modal's web infrastructure](https://swe.quest/articles/lambda-on-hard-mode-inside-modal-s-web-infrastructure-9e5302ebea41d109.md): Modal · 2024-03-14 · Medium · 17 min read · Serverless, Networking, Rust, System design, Real-time systems
  Modal's modal-http service, written in Rust on hyper and Tokio, serves HTTP and WebSocket traffic for serverless functions by translating each request into a function call instead of reverse-proxying to containers.
- [Serverless routing made sticky](https://swe.quest/articles/serverless-routing-made-sticky-bebd537ed004d584.md): Modal · 2026-10-20 · Medium · 5 min read · Serverless, Load balancing, System design, Real-time systems, Capacity planning
  Modal's Sticky Sessions pin every request in a session to the same serverless container, which suits stateful workloads like streaming speech-to-text, voice agents, shared rooms and multiplayer games without resorting to max\_containers=1.
- [Bringing serverless functions closer to the speed of wire](https://swe.quest/articles/bringing-serverless-functions-closer-to-the-speed-of-wire-4593ae513494961f.md): Modal · 2026-08-04 · Medium · 5 min read · Serverless, Performance engineering, System design, Go, Queues & messaging
  Modal rebuilt its serverless I/O plane, which queues Function inputs and outputs, and now runs it in at least four regions.
- [WireGuard at Modal: Static IPs for serverless containers](https://swe.quest/articles/wireguard-at-modal-static-ips-for-serverless-containers-f9b6b3f9bd58963d.md): Modal · 2024-12-02 · Hard · 14 min read · Networking, Linux, Serverless, Go, Multi-tenancy
  Modal built vprox, a high-availability Go VPN proxy on WireGuard, to give multi-tenant serverless containers static outbound IPv4 addresses for things like database IP allowlists.
- [Endpoint Candidates: evaluate and promote inference endpoints](https://swe.quest/articles/endpoint-candidates-evaluate-and-promote-inference-endpoints-e21411973e001e67.md): Modal · 2026-10-12 · Medium · 3 min read · Inference & serving, Deployment, Load balancing, Resilience
  Endpoint Candidates let Modal users stage alternative deployments of a Dedicated Endpoint, such as new checkpoints or different models, mirror a sample of production traffic to them, measure latency, throughput, cost and quality, then promote a winner from the dashboard to the existing URL.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
