Synchronous Request-Response Basics
What you'll learn: How blocking request-response patterns work when your application waits for the LLM to finish processing before moving forward.
The Core Pattern
In a synchronous request-response architecture, your application sends a request to an LLM and blocks — meaning it waits, doing nothing else — until the LLM returns a complete response. This is the simplest communication pattern in LLM applications.
Think of it like ordering coffee at a café where you stand at the counter waiting until your drink is ready. You can't do anything else until the barista hands you your cup. Only then can you proceed to add sugar, find a seat, or leave.
How It Works
When a user submits a prompt:
- Your application sends the request to the LLM API
- The application thread waits (is blocked)
- The LLM processes the entire prompt
- The complete response returns
- Only now can your application process the result and respond to the user
This pattern works well when responses are quick (under a few seconds) and users expect to wait for a complete answer before continuing. It's the default behavior of most LLM API calls — you call the API, execution pauses, and you get back the full text when done.
Trade-offs
Advantages: Simple to implement, easy to reason about, natural for request-scoped operations, fits stateless architectures perfectly.
Limitations: Users must wait for completion (no progress updates), server resources are tied up during generation, and long responses can feel unresponsive.
Key Takeaway: Synchronous request-response is the simplest LLM integration pattern where your application blocks and waits for complete responses — ideal for quick interactions but can feel slow for lengthy generations.