Checking a Required Dependency Before Serving Work

Starting a service process does not establish that every dependency needed for ordinary requests is ready.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace an index-backed API
  2. Check optional roles separately
  3. Define the first operation the service can successfully handle
  4. Use a check with controlled workload and failure meaning

Trace an index-backed API

The application may be listening while its search index is still unavailable. If search is an essential feature, readiness should account for it under the intended policy. See running and ready signals.

Check optional roles separately

A nonessential suggestion service can fail without blocking article reads when the core response remains useful and reports degradation where necessary. Fallback behavior covers this design.[1]

Define the first operation the service can successfully handle

A worker process starts serving a health route before its configuration and required data access are initialized. Readiness can stay false until an inexpensive representative check proves the application can receive ordinary traffic. See liveness and readiness.

Start process → liveness may pass
Initialization pending → keep traffic away
Dependency usable → readiness succeeds under the defined check

Use a check with controlled workload and failure meaning

A readiness check should not itself create expensive work or durable changes. Test a dependency that becomes available later and a temporary failure after startup.

References

  1. Google, Site Reliability Engineering ↩