round trip
One journey of a request to a server and its response back, whose time adds directly to how long the caller waits.
In more detail
Each round trip costs network and processing time on top of the work itself, so fifty quick requests can take longer than one larger request. Reducing round trips is often the cheapest way to speed a program up, especially when the caller is far away.
Examples
A Kafka producer that batches records pays one round trip per batch instead of one per record.A Server Action can mutate data and return the refreshed page in a single round trip.Optimistic updates hide round-trip delay, and render-as-you-fetch starts requests early so they do not queue one after another.A set-based SQL query replaces one query per row with a single round trip.Related terms
- latency — The time between asking for something and getting the answer back.
- embedding — Including a small copy of a related resource inside a representation, instead of only linking to it.
- cache validation — Asking the server whether a stored response is still current by sending back its validator, such as an ETag, in a conditional request.
- record batch — A group of records sent to the broker together in one request, instead of one request per record.
- aggregation — Combining data from several sources into one response.
- optimistic update — Showing the result of a user’s action on screen immediately, before the server confirms it, and undoing it if the server says no.
- compression — Encoding data in fewer bytes by removing repetition, so it takes less space and less time to send.
- network waterfall — A chain of network requests where each one starts only after the previous finished, so their delays add up.
- N+1 query problem — A performance bug where code runs one query for a list and then one more query per item, so N items cost N+1 queries.
- propagation delay — The time a signal needs to physically travel a distance, set by the speed of light in the cable.
- hop — One step a request takes between two machines or programs on its way to the final server.
Taught in
- Caching And Conditional Requests — Modern API Architecture: REST, GraphQL & gRPC
- Sub-resources And Relationships — Modern API Architecture: REST, GraphQL & gRPC
- When Each Wins: REST, GraphQL, gRPC And SOAP — Modern API Architecture: REST, GraphQL & gRPC
- The Data Centre That Went Dark — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Upgrade That Could Not Start — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- API Gateway & BFF Patterns: Backend-for-Frontend — Production Full-Stack Engineering
- Optimistic UI Architecture: Cache & Rollback Protocols — Production Full-Stack Engineering
- Batching, Linger And Throughput — Apache Kafka & Event Streaming
- Optimistic UI: useOptimistic Rollbacks & Transitions — Next.js 15 & Modern App Router Architecture
- Router Cache: In-Memory Client Prefetch Semantics — Next.js 15 & Modern App Router Architecture
- Image & Font Optimization: Zero Layout Shift Assets — Next.js 15 & Modern App Router Architecture
- Native Compression: node:zlib & Streaming Codecs — Node.js Internals & Backend Services
- Asynchronous File I/O: node:fs/promises & Handles — Node.js Internals & Backend Services
- useOptimistic: Instantaneous UI Updates with Rollback — React 19 & Modern Component Architecture
- Client-Side Data Fetching Architectures with Suspense — React 19 & Modern Component Architecture
- Window Functions: Replacing Application Loops — PostgreSQL, Indexing & Relational Data Modeling
- The N Plus One Problem — PostgreSQL, Indexing & Relational Data Modeling
- Latency Numbers Every Engineer Should Know — Scalable System Design & Distributed Architecture
- Caching Strategies And Topology — Scalable System Design & Distributed Architecture
- Monolith Versus Services: The Honest Trade Offs — Scalable System Design & Distributed Architecture
- Worked Design One: Ticket Booking, Correctness First — Scalable System Design & Distributed Architecture