---
title: "Bringing serverless functions closer to the speed of wire"
description: "Modal’s legacy I/O plane routed all function inputs and outputs through us-east servers, adding up to ~200ms of network latency for calls from other regions. The new geographically distributed I/O plane, available in four or more regions, reduces end-to-end function call latencies by roughly 80ms at p50. The redesign involved moving non-critical work to background async processing, minimizing shared storage interactions on the hot path, and rewriting the server layer in Go for better concurrency. The team evaluated Valkey but chose Redis 7.1 because engine CPU usage spiked aggressively on Redis 7.2 onwards during input queue load testing. Users can further optimize by selecting the nearest routing_region, keeping input and output payloads under 2MiB to avoid blob storage uploads, and batching small inputs to reduce network hops."
---

# Bringing serverless functions closer to the speed of wire

[Modal](https://yomu.fyi/company/modal) · Aug 4, 2026

**Type:** Announcement

## Summary

Modal’s legacy I/O plane routed all function inputs and outputs through us-east servers, adding up to ~200ms of network latency for calls from other regions. The new geographically distributed I/O plane, available in four or more regions, reduces end-to-end function call latencies by roughly 80ms at p50. The redesign involved moving non-critical work to background async processing, minimizing shared storage interactions on the hot path, and rewriting the server layer in Go for better concurrency. The team evaluated Valkey but chose Redis 7.1 because engine CPU usage spiked aggressively on Redis 7.2 onwards during input queue load testing. Users can further optimize by selecting the nearest routing\_region, keeping input and output payloads under 2MiB to avoid blob storage uploads, and batching small inputs to reduce network hops.

## Context

Modal’s legacy I/O plane in us-east added up to ~200ms roundtrip latency for function calls from other regions, dominating inference time for fast models. The new I/O plane is geographically distributed across four or more regions, and the migration to us-east was completed this week, yielding an 80ms p50 latency reduction.

## Approach / What changed

Redesigned the I/O plane to be geographically distributed, with non-critical work moved to async background, minimized hot-path shared storage interactions, server layer rewritten in Go, and Redis 7.1 chosen over Valkey due to CPU spikes on Redis 7.2+.

## Takeaways

- The new regional I/O plane reduces p50 function call latency by roughly 80ms compared to the legacy us-east-only routing.
- Rewriting the server layer in Go improved concurrency for gRPC handling over async Python, which suffered from event loop lag under CPU-intensive operations.
- Keep input and output payloads under 2MiB to avoid extra blob storage uploads; batch small inputs into one larger input to reduce network hops.

## FAQ

### How much latency does the new I/O plane save?

End-to-end function call latencies dropped by roughly 80ms at p50. The legacy system added up to ~200ms roundtrip for non-us-east regions, so the new regional plane significantly reduces that.

### Why did Modal choose Redis 7.1 over Valkey?

During input queue load testing, engine CPU usage spiked aggressively on Redis 7.2 onwards. Valkey is forked from Redis 7.2 and uses I/O multithreading, but the team observed better performance with Redis 7.1.

### What can users do to optimize function call performance?

Select the routing\_region closest to clients, keep payloads under 2MiB to avoid blob storage uploads, and batch small inputs into one larger input to reduce network hops.

**Tags:** [Go](https://yomu.fyi/topic/go), [Latency](https://yomu.fyi/topic/latency), [Performance](https://yomu.fyi/topic/performance), [Redis](https://yomu.fyi/topic/redis), [Serverless](https://yomu.fyi/topic/serverless)

- Source: [Modal](https://modal.com/blog/bringing-serverless-functions-closer-to-the-speed-of-wire)
- Source URL: https://modal.com/blog/bringing-serverless-functions-closer-to-the-speed-of-wire
- Ingested by Yomu: 2026-09-20T07:47:16.858Z

[Read original post](https://modal.com/blog/bringing-serverless-functions-closer-to-the-speed-of-wire)
