Skip to main content
GET
Liveness & Readiness Probes

Overview

Aurora provides dedicated liveness and readiness probe endpoints for Kubernetes and container orchestration platforms. These endpoints enable fine-grained health monitoring and automated recovery strategies.

Liveness Probe

Endpoint

Description

The liveness probe checks if the Flask application process is running and responsive. This is a lightweight check that doesn’t verify external dependencies. Kubernetes uses this to determine if the container should be restarted.

Response

string
required
Always returns "alive" if the application is running

Status Codes

status code
Application is alive and responsive

Example Response

Usage

Kubernetes Configuration

cURL


Readiness Probe

Endpoint

Description

The readiness probe checks if the application is ready to accept traffic by verifying critical dependencies (database and Redis). Kubernetes uses this to determine if the pod should receive traffic from the service load balancer.

Response

Ready State

string
required
Returns "ready" when critical services are available

Not Ready State

string
required
Returns "not_ready" when critical services are unavailable
object
required
Health status of critical services

Status Codes

status code
Application is ready to accept traffic (both database and Redis are healthy)
status code
Application is not ready (database or Redis is unhealthy)

Example Responses

Ready

Not Ready

Usage

Kubernetes Configuration

cURL

JavaScript

Python


Probe Comparison

Best Practices

Liveness Probe Configuration

  • Initial Delay: Set initialDelaySeconds to allow application startup (30-60 seconds)
  • Period: Check frequently (10-30 seconds)
  • Timeout: Keep short (5 seconds)
  • Threshold: Allow 2-3 failures before restart to avoid flapping

Readiness Probe Configuration

  • Initial Delay: Short delay (10-15 seconds) as dependencies should start first
  • Period: Check frequently (5-10 seconds) for fast recovery
  • Timeout: Moderate timeout (3-5 seconds)
  • Threshold: Single success to start receiving traffic, 2-3 failures to stop

Combined Configuration Example

Monitoring Recommendations

Metrics to Track

  1. Liveness Failures: Alert on repeated liveness failures indicating application crashes
  2. Readiness Failures: Track dependency health issues (database, Redis)
  3. Recovery Time: Monitor time from not-ready to ready state
  4. Probe Response Time: Detect performance degradation

Alert Examples