---
title: "Serverless routing made sticky"
description: "Modal launched Sticky Sessions, a serverless routing feature that guarantees all requests in a session reach the same container, solving the problem of stateful workloads that require continuity between requests. Use cases include speech-to-text models with decoder state, voice agents holding conversations, and multiplayer games where players must reconnect to the same container. Sticky Sessions build on Modal’s in-house stateless proxy (fprs) and use a signed session token returned by sessions.start() to encode routing metadata, avoiding the need for proxy state and enabling fixed routing without persistent mapping. Load balancing probes containers for concurrency snapshots and combines them with recent routing decisions to distribute sessions evenly, while autoscaling monitors active session counts and queued demand to size the compute fleet appropriately. The feature enables low-latency voice agents via WebRTC signaling, shared chat rooms where clients share a session token, and gaming applications that preserve in-memory state across player reconnections."
---

# Serverless routing made sticky

[Modal](https://yomu.fyi/company/modal) · Siwon Park, Kartik Sinha, Kathir Meyyappan, Daniel Shaar · Oct 20, 2026

**Type:** Announcement

## Summary

Modal launched Sticky Sessions, a serverless routing feature that guarantees all requests in a session reach the same container, solving the problem of stateful workloads that require continuity between requests. Use cases include speech-to-text models with decoder state, voice agents holding conversations, and multiplayer games where players must reconnect to the same container. Sticky Sessions build on Modal’s in-house stateless proxy (fprs) and use a signed session token returned by sessions.start() to encode routing metadata, avoiding the need for proxy state and enabling fixed routing without persistent mapping. Load balancing probes containers for concurrency snapshots and combines them with recent routing decisions to distribute sessions evenly, while autoscaling monitors active session counts and queued demand to size the compute fleet appropriately. The feature enables low-latency voice agents via WebRTC signaling, shared chat rooms where clients share a session token, and gaming applications that preserve in-memory state across player reconnections.

## Context

Stateful serverless workloads such as speech-to-text models, voice agents, and multiplayer games require requests to land on the same container for session continuity, which Modal’s existing request-level routing did not guarantee.

## Approach / What changed

Modal implemented Sticky Sessions using a signed session token returned by sessions.start() to encode routing metadata, load balancers that probe containers for concurrency snapshots and combine them with recent routing decisions, and an autoscaler that monitors active session counts and queued demand to size the compute fleet.

## Takeaways

- Sticky Sessions use a signed session token returned by sessions.start() to encode routing metadata, avoiding the need for proxy state and enabling fixed routing without persistent mapping.
- Load balancing probes containers for concurrency snapshots and combines them with recent routing decisions to distribute sessions evenly across available containers.
- Autoscaling uses active session counts and queued demand as the unit of concurrency, rather than request volume, to size the compute fleet.

## FAQ

### How does Sticky Sessions handle authorization without a Proxy Token?

Each sessions.start() request returns a signed session token that grants access to that session. Sharing this token among clients allows multiple participants to access the same state without turning off authentication or passing the Proxy Token around.

### How does load balancing work without proxy session state?

Load balancers periodically probe containers for a snapshot of their available concurrency. They combine recent routing decisions with probed snapshots to inform container selection, evenly distributing sessions while minimizing wasted roundtrips to containers that are out of capacity.

### What workloads does Sticky Sessions enable?

Sticky Sessions enable low-latency voice agents (e.g., Pipecat agent over WebRTC), shared rooms (e.g., chat room where each room is a session), and gaming applications (e.g., Curvytron multiplayer game) that require session continuity and in-memory state.

**Tags:** [Autoscaling](https://yomu.fyi/topic/autoscaling), [Load Balancing](https://yomu.fyi/topic/load-balancing), [Routing](https://yomu.fyi/topic/routing), [Serverless](https://yomu.fyi/topic/serverless)

- Source: [Modal](https://modal.com/blog/serverless-routing-made-sticky)
- Source URL: https://modal.com/blog/serverless-routing-made-sticky
- Ingested by Yomu: 2026-10-21T00:00:22.738Z

[Read original post](https://modal.com/blog/serverless-routing-made-sticky)
