Architecture & BFF

Upstream Fan-out

Direct Definition

Upstream Fan-out is an execution strategy where an edge gateway dispatches multiple HTTP subrequests to separate origin services concurrently rather than sequentially. The total latency is bound by the single slowest subrequest (max time) rather than the cumulative sum of all subrequests.

Technical Architecture & Deep-Dive

In sequential API calls, if Service A takes 120ms, Service B takes 180ms, and Service C takes 100ms, the client waits at least 400ms. In an upstream fan-out architecture, all three calls execute in parallel from the edge; the client receives the merged response in roughly 185ms (the time of the slowest call plus minimal edge aggregation overhead).

Modern serverless edge runtimes provide lightweight async I/O that enables tens of simultaneous subrequests per incoming connection without thread exhaustion.

Key Architectural Benefits

Reduces end-to-end composite API latency from sum(t) to max(t).
Isolates upstream failures using isolated timeout windows and fallbacks per branch.
Simplifies frontend code by replacing multi-fetch orchestration with a single edge endpoint.
REALCOMPOSER EDGE WORKSPACE

Implement Upstream Fan-out at the Edge

Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.

START BUILDING FREE

Frequently Asked Questions

Q:What is the risk of excessive fan-out?

High fan-out can strain upstream APIs if too many parallel subrequests trigger rate limits. Pairing fan-out with edge caching ensures subrequests are only fired on cache misses.

Related Architecture Concepts

Ready-to-Use Edge Recipes