---
title: "Readiness endpoint that checks system resources, Redis, Queue, and plugins."
method: GET
path: "/api/v1/ready"
tags: ["Health"]
---

# Readiness endpoint that checks system resources, Redis, Queue, and plugins.

`GET /api/v1/ready`

Returns 200 OK if the service is ready to accept traffic, or 503 Service Unavailable if not.
This endpoint is used for readiness probes in container orchestration platforms like
AWS ECS or Kubernetes.

## Health Check Components

- **System**: File descriptor usage, CLOSE_WAIT socket count
- **Redis**: Primary and reader pool connectivity
- **Queue**: Queue's Redis connections (separate from app's Redis)
- **Plugins**: Plugin pool health, circuit breaker state, and connection metrics (if enabled)

## Status Levels

- `healthy`: All components operational
- `degraded`: Some components degraded but service can function (e.g., reader pool down)
- `unhealthy`: Critical components failed, service unavailable

## Plugin Connection Metrics

When plugins are enabled, the following connection metrics are exposed:

- `shared_socket_available_slots`: Number of additional concurrent plugin executions that can start
- `shared_socket_active_connections`: Current number of active plugin execution connections
- `shared_socket_registered_executions`: Number of plugin executions currently registered (awaiting response)
- `connection_pool_available_slots`: Available connections to the pool server
- `connection_pool_active_connections`: Active connections to the pool server

These metrics help diagnose connection pool exhaustion and plugin capacity issues.

## Caching

Health check results are cached for 10 seconds to prevent excessive load from frequent
health checks. Multiple requests within the TTL return the same cached response.

## Response `200`

Service is ready (healthy or degraded)

- ReadinessResponse — Complete readiness response.
  - `components` Components, required — All health check components.
    - `plugins` PluginHealth — Plugin health information.
      - `avg_response_time_ms` integer — Average response time in milliseconds
      - `circuit_state` string
      - `connection_pool_active_connections` integer — Connection pool active connections (for pool server connections)
      - `connection_pool_available_slots` integer — Connection pool available slots (for pool server connections)
      - `enabled` boolean, required
      - `error` string
      - `memory` integer — Memory usage in bytes
      - `pool_completed` integer — Number of completed tasks in the pool
      - `pool_queued` integer — Number of queued tasks in the pool
      - `recovering` boolean — Whether recovery mode is active
      - `recovery_percent` integer — Current recovery allowance percentage
      - `shared_socket_active_connections` integer — Shared socket active connection count
      - `shared_socket_available_slots` integer — Shared socket available connection slots
      - `shared_socket_registered_executions` integer — Shared socket registered execution count
      - `status` 'healthy' | 'degraded' | 'unhealthy', required — Component health status levels.
      - `success_rate` number, double — Success rate as a percentage (0.0-100.0)
      - `uptime_ms` integer — Plugin uptime in milliseconds
    - `queue` QueueHealth, required — Queue health information.
      - `error` string
      - `status` 'healthy' | 'degraded' | 'unhealthy', required — Component health status levels.
    - `redis` RedisHealth, required — Redis health information.
      - `error` string
      - `primary_pool` PoolStatus, required — Status of an individual Redis connection pool.
        - `available` integer, required — Number of available connections in the pool.
        - `connected` boolean, required — Whether the pool is connected and responding to PING.
        - `error` string — Error message if the pool is not healthy.
        - `max_size` integer, required — Maximum configured pool size.
      - `reader_pool` PoolStatus, required — Status of an individual Redis connection pool.
        - `available` integer, required — Number of available connections in the pool.
        - `connected` boolean, required — Whether the pool is connected and responding to PING.
        - `error` string — Error message if the pool is not healthy.
        - `max_size` integer, required — Maximum configured pool size.
      - `status` 'healthy' | 'degraded' | 'unhealthy', required — Component health status levels.
    - `system` SystemHealth, required — System health information (file descriptors, sockets).
      - `close_wait_count` integer, required
      - `error` string
      - `fd_count` integer, required
      - `fd_limit` integer, required
      - `fd_usage_percent` integer, required
      - `status` 'healthy' | 'degraded' | 'unhealthy', required — Component health status levels.
  - `ready` boolean, required
  - `reason` string
  - `status` 'healthy' | 'degraded' | 'unhealthy', required — Component health status levels.
  - `timestamp` string, required

## Other responses

- `503` — Service is not ready (unhealthy)

---

[API](https://skmtc.dev/openzeppelin/apis/openzeppelin-relayer-api.md) · [All operations](https://skmtc.dev/openzeppelin/apis/openzeppelin-relayer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openzeppelin/openzeppelin-relayer-api/revisions/e6e7514284f5/schema)
