Skip to main content

4.11. Making Multiple Requests

4.11. Making Multiple Requests

Often, clients need to make multiple HTTP requests to accomplish a task. When specifying such behavior, applications need to consider:

  • Request ordering: If requests need to be made in a specific order, this should be clearly specified.

  • Error handling: What should happen if one request in a sequence fails?

  • Atomicity: If a series of requests should be treated as an atomic unit, how is this ensured?

  • Performance: Making many sequential requests can be slow. Applications should consider how to minimize round trips.

Applications SHOULD:

  • Allow for requests to be made in parallel where possible, rather than requiring strict sequencing.

  • Clearly specify any dependencies between requests.

  • Consider using batch or compound operations where appropriate to reduce the number of requests needed.

  • Be aware that HTTP/2 [HTTP/2] and HTTP/3 [HTTP/3] allow multiple requests to be in flight simultaneously on a single connection, which can significantly improve performance for applications that need to make multiple requests.

Applications SHOULD NOT assume that multiple requests will be processed by the same server instance or in a specific order unless the application explicitly coordinates this through the use of state or other mechanisms.