Trending
Attackers already understand your software supply chain better than you do Beyond the price per token: Choosing the right OpenAI model on Amazon Bedrock for your workload UK telcos lament planning rules, says 5G coverage is being stifled EP225: Why Does Git Revert Cause Conflicts? Why Actuvi Is Growing So Quickly Compared to Other Digital Health Startups The Extinction Risk Preference Cascade: Quotes Timur Turlov and the FIDE election: How a business approach could change global chess Orbital partners with Reflex Aerospace for space data center constellation Satellite Internet coming to UK rail network as part of £7.8bn space strategy Behavior Change Isn’t a One-Time Achievement Because Barriers Are Constantly Changing Learn Claude Code, evals, AI systems, and more: ByteByteGo Live is here Sponsored: Fluid strategy in the era of high-density computing The Internet of Bodies is Coming – Your Body Already Knows – Life Sciences Today Podcast Episode 78 Lifesaving Lincoln Laboratory device wins 2026 Excellence in Technology Transfer Award Weekly Roundup – September 12, 2026

A Detailed Guide to API Composition Techniques

In a service-based architecture, a single product screen showing a user profile, that user’s five most recent orders, the delivery status of each order, and a short list of recommendations requires data from four separate services. Each service stores only its own data, so none of the four services returns the full set on its own.

In other words, the caller issues four separate calls, and merges the resulting four responses in the structure needed for the user interface. This merging step is API composition, and it exists in every system where data is split across more than one service.. The code that performs this merging can run in several places.

It can run inside the mobile application, on a server in the datacenter, at a CDN edge location, or inside one of the four services. Putting a server between the mobile application and the four services adds a network hop, which sounds like it should cost extra time. However, it usually reduces total load time instead, because a round trip between a phone and a server on a weak mobile connection can take a few hundred milliseconds, while a round trip between two services inside the same datacenter takes a fraction of a millisecond.

To put it simply, trading four expensive round trips for one expensive round trip plus four cheap ones is often a large net saving.. However, latency is only the first tradeoff. The place where the merge operation runs also determines what happens when one of the four services is unavailable, how much of the response can be cached, and which team has to approve a change before the screen ships..

In this article, we are going to dive deep into the area of the API composition problem and the patterns associated with it. Here’s what we will cover:. The API composition problem.

Client-side composition. Over-fetching and under-fetching. Composition, aggregation, and orchestration.

API gateways. Backends for Frontends. GraphQL as a composition layer.

Edge composition. Availability and caching tradeoffs. Versioning across multiple frontends.

Ownership of the composition layer

 

Join the conversation

Your email address will not be published. Required fields are marked *