warehouse stream, and a warehouse worker picks it up, executes the SQL, and returns the results.
Example configuration
A complete Helm values configuration with NATS and a warehouse worker:NATS_ENABLED=true and NATS_URL for you. See the overview for details on JetStream configuration options.
Configuration reference
All configuration is set through your Helmvalues.yaml under warehouseNatsWorker:
Scaling
| Helm value | Default | Description |
|---|---|---|
warehouseNatsWorker.replicas | 1 | Number of worker pods. Scale horizontally for more parallel query capacity. |
warehouseNatsWorker.concurrency | 100 | Maximum concurrent jobs per pod. Maps to NATS_WORKER_CONCURRENCY env var. |
Resources
| Helm value | Recommended (request) | Recommended (limit) | Description |
|---|---|---|---|
warehouseNatsWorker.resources.requests.cpu | 250m | ā | CPU request per pod |
warehouseNatsWorker.resources.requests.memory | 1.5Gi | 1.5Gi | Memory request and limit per pod |
Auto-configured environment variables
These are set by the Helm chart:| Variable | Set from | Value |
|---|---|---|
NATS_ENABLED | nats.enabled: true | "true" |
NATS_URL | nats.enabled: true | nats://<release>-nats:4222 |
NATS_WORKER_CONCURRENCY | warehouseNatsWorker.concurrency | 100 |
Optional environment variables
These can be set viaextraEnv or configMap if you need to override the defaults:
| Variable | Default | Description |
|---|---|---|
NATS_QUEUE_TIMEOUT_MS | 180000 (3 min) | How long a message can wait in the queue before being discarded. |
Troubleshooting
Queries timing out
If workers are busy, messages may expire before being processed. Scale up replicas or concurrency.Worker OOM kills
Increase the memory request and limit. Large query result sets are held in memory during processing.NATS connection errors
- Confirm the NATS pod is running and healthy
- Verify that
NATS_URLis set correctly on the warehouse worker pod (should benats://<release>-nats:4222) - Check that your network policies allow traffic between the worker pods and the NATS service on port
4222