Readiness Checks

Confirm services are truly ready before starting dependent tiers.

How It Works

When a service has a readiness check configured, fuku waits for it to pass before marking the service as ready. The next tier only begins after all services in the current tier are ready.

fuku run default
 tier foundation
    auth        checking http localhost:8081/health...
    gateway     checking http localhost:8082/health...
    gateway     ready    1.8s
    auth        ready    2.1s

 tier platform
    api         checking http localhost:8080/health...
    api         ready    4.5s

Check Types

HTTP

Wait for an HTTP endpoint to respond with a 2xx status code:

fuku.yaml
services:
  api:
    dir: ./api
    readiness:
      type: http
      url: http://localhost:8080/health
      timeout: 30s
      interval: 1s

TCP

Wait for a TCP port to accept connections:

fuku.yaml
services:
  gateway:
    dir: ./gateway
    readiness:
      type: tcp
      address: localhost:9000
      timeout: 10s
      interval: 1s

Log

Wait for a specific pattern to appear in the service's output:

fuku.yaml
services:
  grpc-server:
    dir: ./grpc
    readiness:
      type: log
      pattern: "gRPC server started"
      timeout: 30s

Configuration Reference

Field Description
type http, tcp, or log
url HTTP endpoint to check (http type only)
address Host:port to connect to (tcp type only)
pattern String to match in log output (log type only)
timeout Maximum time to wait before marking as failed
interval Time between check attempts (http/tcp only)

Retry on Failure

If a readiness check times out, fuku can retry the service start based on your retry configuration:

fuku.yaml
retry:
  attempts: 3 # Max retry attempts (default: 3)
  backoff: 500ms # Initial backoff duration (default: 500ms)

Ready to try it out?

Get Started