Synchronous I/O

Last updated

What is Synchronous I/O?

Blocking the calling thread while I/O completes can reduce performance and affect vertical scalability.

A synchronous I/O operation blocks the calling thread while the I/O completes. The calling thread enters a wait state and is unable to perform useful work during this interval, wasting processing resources.

Common examples of I/O include:

  • Retrieving or persisting data to a database or any type of persistent storage.
  • Sending a request to a web service.
  • Posting a message or retrieving a message from a queue.
  • Writing to or reading from a local file.

This antipattern typically occurs because:

  • It appears to be the most intuitive way to perform an operation.
  • The application requires a response from a request.
  • The application uses a library that only provides synchronous methods for I/O.
  • An external library performs synchronous I/O operations internally. A single synchronous I/O call can block an entire call chain.

Free resources to learn Synchronous I/O

More in stage 18: Monitoring

Synchronous I/O: common questions

Can I learn Synchronous I/O in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Synchronous I/O in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Synchronous I/O tutorial for beginners?

It is lesson 82 of 147 in the free System Design roadmap, in stage 18, Monitoring. If you are new to System Design, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me