Bulkhead isolation using bounded process pools.
Prevents a spike in one area (e.g., investment sync for one tenant) from exhausting resources needed by another (e.g., auth for all tenants).
Named bulkheads
:transactions— transaction sync workers:webhooks— webhook processing:investments— investment data ingestion:transfers— transfer operations:general— default for uncategorised requests
Usage
PlaidEx.Reliability.Bulkhead.run(:transactions, fn ->
PlaidEx.API.Transactions.sync(config, access_token: token)
end)Returns {:ok, result} or {:error, :bulkhead_full} if the pool
is at capacity.
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns child specs for all bulkhead pools, suitable for a Supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec child_specs() :: [map()]
Returns child specs for all bulkhead pools, suitable for a Supervisor.
@spec start_link({atom(), pos_integer()}) :: GenServer.on_start()