warm_containers, min_containers, and max_containers.
Example workflow with scaling:
POST /applications/process_workflow, the workflow endpoint scales automatically, and each function scales based on its configuration.
Scaling Parameters
Configure scaling in the@function() decorator:
warm_containers
Number of pre-warmed containers to keep ready. Warm containers have your code and dependencies loaded, eliminating cold start latency for incoming requests.
- You need low-latency responses
- Cold starts are unacceptable for your use case
- You have predictable baseline traffic
min_containers
Guaranteed minimum number of containers. Unlike warm_containers, these containers may also be actively processing requests. Tensorlake will never scale below this number.
max_containers
Maximum number of containers. Once this limit is reached, additional requests are automatically queued and processed in FIFO order as containers become available.
Automatic Queuing
When all containers for a function are busy andmax_containers has been reached, Tensorlake automatically queues incoming requests. No configuration is needed — queuing is built into the platform.
- Requests are processed in FIFO order
- Queued requests begin processing as soon as a container becomes available
- No separate queue infrastructure (Redis, SQS, RabbitMQ) is required
Combined Behaviors
Combine parameters for fine-grained control:Low-latency with bounded scale
Guaranteed capacity with ceiling
Full control
Scaling in Workflows
Each function in your workflow scales independently. This allows different workflow steps to have different scaling profiles based on their resource requirements and latency needs:fetch_data can scale to 50 containers for high throughput, while analyze_with_llm is capped at 3 to control costs. When you call the process_record endpoint, both functions scale independently based on their configuration.
Default Behavior
Without any scaling parameters, workflow functions scale dynamically:- Containers scale from zero based on demand when the workflow endpoint is called
- There is no upper bound on container count
- Cold starts occur for the first request after an idle period
- No automatic queuing (unlimited scaling)