𝗖𝗵𝗮𝘁𝘁𝘆 𝗔𝗣𝗜𝘀 𝗔𝗿𝗲 𝗞𝗶𝗹𝗹𝗶𝗻𝗴 𝗬𝗼𝘂𝗿 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲

 𝗖𝗵𝗮𝘁𝘁𝘆 𝗔𝗣𝗜𝘀 𝗔𝗿𝗲 𝗞𝗶𝗹𝗹𝗶𝗻𝗴 𝗬𝗼𝘂𝗿 𝗣𝗲𝗿𝗳𝗼𝗿𝗺𝗮𝗻𝗰𝗲

Chatty APIs feel harmless.

Until latency starts killing your system.

A common pattern:

Client → API call → API call → API call → API call

To build a single screen.

Each call looks small.
Together, they become expensive.

Problems with chatty APIs:

• High latency (too many round trips)
→ Every request takes time (network + processing). Multiple small calls add up and slow down the overall response

• Increased failure points
→ If one out of many calls fails, the whole user flow can break

• More load on network and services
→ Repeated calls increase traffic and put unnecessary pressure on backend systems

• Poor user experience (slow responses)
→ Users feel delays, especially on mobile or low network conditions

The issue isn’t just performance.
It’s design.

Better approach:

• Fetch more data in fewer calls (coarse-grained APIs)
→ Design APIs that return all required data in one response instead of forcing multiple calls

• Use aggregation at the backend (combine multiple calls into one)
→ Let the backend call different services internally and return a single combined response to the client

• Cache frequently used data
→ Store common responses so repeated requests don’t always hit the backend

• Avoid unnecessary network hops
→ Reduce service-to-service calls where possible; keep the path from request to response simple

Think in terms of:

“Give me everything I need”
instead of
“Let me ask for everything step by step”

Every network call has a cost.
Reduce the conversation.

Good APIs don’t talk more.
𝗧𝗵𝗲𝘆 𝘀𝗮𝘆 𝗺𝗼𝗿𝗲 𝗶𝗻 𝗳𝗲𝘄𝗲𝗿 𝘄𝗼𝗿𝗱𝘀.
Previous Post Next Post