---
title: "Serverless routing made sticky"
description: "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."
url: "https://swe.quest/articles/serverless-routing-made-sticky-bebd537ed004d584"
canonical: "https://modal.com/blog/serverless-routing-made-sticky"
source: "Modal"
published: "2026-10-20"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 5
tags: ["serverless","load-balancing","system-design","realtime","capacity-planning"]
---

# Serverless routing made sticky

A post on [Modal](https://swe.quest/sources/modal.md), published 2026-10-20, 5 min read, Announcement. Original: [https://modal.com/blog/serverless-routing-made-sticky](https://modal.com/blog/serverless-routing-made-sticky)

## Summary

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. The feature builds on Modal Servers and their stateless proxy (fprs). Routing metadata is encoded in a signed session token, so the proxy holds no session-to-container mapping. Load balancers combine periodic concurrency probes with recent routing decisions to place sessions, and the autoscaler treats sessions rather than requests as the unit of concurrency, queuing new sessions when capacity runs out.

Written by swe.quest, not by the author.

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

## Topics

- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [Capacity planning](https://swe.quest/tags/capacity-planning.md) (Reliability & operations)

## Prerequisites

- serverless containers ([easy posts on Serverless](https://swe.quest/tags/serverless.md?difficulty=easy))
- HTTP 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, Sticky Sessions, Modal Servers, fprs, WebRTC, Pipecat, Curvytron

## Related posts

- [Modal's serverless Servers](https://swe.quest/articles/modal-s-serverless-servers-c4c4d9aad435b2d6.md): Modal · 2026-06-25 · Medium · 10 min read · Load balancing, Serverless, Inference & serving, Rust, Performance engineering
  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.
- [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.
- [Augment Your LiveKit Agent with Modal GPUs](https://swe.quest/articles/augment-your-livekit-agent-with-modal-gpus-7c537d7efe5221b2.md): Modal · 2026-10-15 · Medium · 2 min read · Serverless, Real-time systems, Inference & serving, Speech & audio, Video & media
  LiveKit agents can offload custom or open-weights models to Modal serverless GPUs, demonstrated with a BitHuman Expression video avatar voiced by Qwen3-TTS.
- [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.
- [Serverless functions vs containers: CI/CD, database connections, cron jobs, and long-running tasks](https://swe.quest/articles/serverless-functions-vs-containers-ci-cd-database-connections-cron-jobs-and-e17b0efd79500afc.md): Railway · 2025-12-16 · Medium · 11 min read · Serverless, Containers, Deployment, Schema migrations, Cloud platforms
  Serverless functions and container platforms differ in execution model, which changes how you handle deploys, database access, cron jobs, rollbacks and long-running work.

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)
