In telecommunications and related fields (including software development), the term timeout is used in relation to the intentional ending of an incomplete task. It can refer to:
- The period of time during which the system waits for an event. If the event does not occur, the system ends the waiting loop to enable another try or the termination of the process.
- The disconnection itself that occurs at the end of the specified period.
- The error that occurs when the system does not receive the event.
Timeouts are common in communications applications. They allow for the efficient use of resources by freeing up a line or port that is tied up with a request that has not been answered in a reasonable time. The idea is that in situations where the system has to wait for something to happen, the waiting is aborted when the timeout period has passed.
For example, when a customer searches for rental cars on a broker’s website, APIs are used to send availability requests to car rental suppliers. The website displays a loading screen during the time the system is waiting for the responses. If the suppliers do not respond, the customer would keep seeing the loading screen indefinitely. To prevent that, a timeout period has been defined so that the customer would see an error message after a reasonable time has passed.
In this situation where several requests are sent at the same time, timeout also serves another purpose. It prevents the customer from waiting too long to get offers. Suppliers can respond at different speeds – some faster than the timeout period and some slower. Once the timeout period ends, the system can still proceed without an error. But the customer will see only the offers from the suppliers who responded before the period ended.