timeout

A limit on how long a caller waits for an answer before giving up.

In more detail

A timeout means the outcome is unknown, not that nothing happened: the server may have finished the work. Every dependency call needs one, or a slow service can tie up all your capacity. gRPC calls this a deadline.

Examples

In AWS: The longest time something is allowed to run or wait before it is stopped and treated as failed.
future.get(timeout=10)
client := &http.Client{Timeout: 5 * time.Second}
Go: context.WithTimeout(ctx, 2*time.Second) or http.Client{Timeout: 5 * time.Second}
Java: future.get(2, TimeUnit.SECONDS); the course configuration record has a timeoutSeconds field.
result.get(2, TimeUnit.SECONDS)
In the worked outage a payment dependency starts timing out and checkout fails.
In this course: Every network call needs one, and the timeout path is an error path that tests should reach with a double that raises. Reviewers should ask what the caller sees when a timeout happens.

Related terms

Taught in

References

Certification courses