Supervisor for worker pools.
This supervisor manages the async and stream worker pools based on application configuration. It ensures worker pools are restarted if they crash.
Configuration
Configure in config.exs:
config :phoenix_gen_api, :worker_pool,
async_pool_size: 100,
stream_pool_size: 50,
max_queue_size: 1000,
circuit_breaker_threshold: 10,
circuit_breaker_cooldown: 60_000Circuit Breaker
The circuit_breaker_threshold and circuit_breaker_cooldown options
control the circuit breaker behavior for both the pool and individual
workers. See WorkerPool and Worker for details.
Pool Types
- Async Pool - For asynchronous request execution
- Stream Pool - For streaming request execution
Each pool can have different sizes based on your workload characteristics.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.