Skip to main content

Recipe Serve Advanced CLI

Advanced CLI options for the recipe server including rate limiting, metrics, admin endpoints, workers, and OpenTelemetry tracing.

Quick Reference

Command Options

Rate Limiting

Protect your server from abuse.

Test Rate Limiting

Expected output after 5 requests:

Request Size Limits

Prevent oversized payloads.

Test Size Limit

Expected response:

Metrics Endpoint

Expose Prometheus metrics.

Sample Output

Prometheus Integration

Admin Endpoints

Hot-reload recipes without restart.

Response

Workers

Scale with multiple processes.

Notes

  • Workers > 1 automatically disables --reload
  • Each worker has independent rate limiter state
  • For distributed rate limiting, use external store (Redis)

OpenTelemetry Tracing

Distributed tracing support.

Install Dependencies

OpenAPI Specification

Get the API specification.

Configuration File

All CLI options can be set in serve.yaml:
Use with:

Production Examples

Basic Production

Full Production

Docker

Kubernetes

Environment Variables

Troubleshooting

Rate Limit Not Working

Check if path is exempt:

Metrics Endpoint 404

Enable metrics:

Admin Endpoint 401

Provide authentication:

Workers with Reload

Cannot use both:

Next Steps