Introduction
Each environment deployed to Laravel Cloud runs on at least one App compute instance, which is assigned a specified amount of CPU processing power and available RAM. Your environment’s App compute instance is responsible for handling incoming HTTP traffic to the environment. In addition, you may add dedicated worker compute instances to your environment to process queued jobs or execute other background processes. You can manage the compute resources assigned to an environment from the environment’s infrastructure canvas dashboard.App cluster
Your environment’s App cluster represents the primary compute and infrastructure that will run your application. This compute cluster can serve web traffic, scale to zero, and manage long-running processes such as queue workers. It can also run scheduled tasks. To scale or customize your environment’s App cluster, click the cluster in your environment’s infrastructure canvas dashboard.
Laravel Octane
Laravel Octane is available for Laravel applications only.

Before enabling the Laravel Octane runtime, make sure you have added Laravel Octane to your application using the Composer package manager.
Inertia SSR
Inertia SSR is available for Laravel and Rails applications.
npm run build:ssr command instead of npm run build:
Rails
Rails applications need theinertia_rails gem, version 3.20.0 or later, and its Puma plugin, which starts the SSR server alongside Puma. Add the plugin to your config/puma.rb file:
INERTIA_SSR_ENABLED=true. Make sure your build commands also build your SSR bundle, such as by enabling ssrBuildEnabled in config/vite.json so assets:precompile builds it.
Worker clusters
Worker clusters run background processes on compute that is separate from your App cluster and web traffic. See Workers to learn how to create worker clusters and configure background processes.Autoscaling
Laravel Cloud can automatically scale the compute resources attached to your environment based on demand, CPU usage, and memory usage. To configure your environment’s autoscaling strategy, click your environment’s App or Worker compute cluster on the infrastructure canvas dashboard. Then, select the autoscaling strategy that fits your environment. Laravel Cloud supports three autoscaling strategies:- None: run your App or Worker compute on a single instance without autoscaling.
- Custom: automatically scale your App or Worker compute clusters up and down horizontally within a specified minimum and maximum replica range.
- Unlimited: automatically scale your App or Worker compute clusters up and down indefinitely based on demand.

Default CPU threshold
When an App cluster has no CPU threshold of its own, Laravel Cloud adds replicas once CPU usage reaches 60% of the vCPUs your application can use. An application that serves requests from a single process can’t use more than one vCPU, so Laravel Cloud lowers the threshold on larger instances:- Node.js, Bun, and Deno: Laravel Cloud counts one vCPU. With
deno serve --parallel, it counts one vCPU perDENO_JOBSworker, or every vCPU whenDENO_JOBSis unset. - Rails: With the start command Laravel Cloud generates, Laravel Cloud counts one vCPU per
WEB_CONCURRENCYprocess, or one vCPU whenWEB_CONCURRENCYis unset. With a custom start command, it counts every vCPU on the instance. - Ruby without a framework: Laravel Cloud counts one vCPU.
- Other runtimes: Laravel Cloud counts every vCPU on the instance.
HTTP traffic autoscaling
For App clusters, Laravel Cloud automatically scales HTTP applications based on real-time traffic pressure in addition to your configured CPU and memory thresholds. Laravel Cloud scales based on whichever limit is reached first. Laravel Cloud’s ingress layer tracks the requests your application is processing. Laravel Cloud compares the highest number of in-flight requests from the last minute with the number of requests each replica can handle, and adds replicas when demand exceeds that capacity:Memory-based estimate
PHP-FPM applications, and applications whose runtime has no estimate of its own, use a memory-based estimate. Laravel Cloud estimates that each worker uses approximately 30 MB of memory and processes one request at a time. Each replica runs between 10 and 1,000 workers, and Laravel Cloud adds replicas once 70% of them are busy:Octane
When your App cluster runs Laravel Octane, each Octane worker processes one request at a time, and Laravel Cloud adds replicas once every worker is busy. By default, each replica runs a third of the PHP-FPM worker count, so a 512 MB replica runs 5 Octane workers. To change the number of Octane workers, set theLARAVEL_CLOUD_OCTANE_WORKERS environment variable. Laravel Cloud caps the value at one less than the PHP-FPM worker count for the instance size.
Gunicorn and Puma
Gunicorn and Puma process one request per thread. When your application uses the start command Laravel Cloud generates, each replica’s capacity is its full thread pool, and Laravel Cloud adds replicas once every thread is busy:- Gunicorn: The thread pool is
WEB_CONCURRENCYworkers multiplied byGUNICORN_THREADSthreads. - Puma: The thread pool is
WEB_CONCURRENCYprocesses multiplied byRAILS_MAX_THREADSthreads. Laravel Cloud counts one process whenWEB_CONCURRENCYis unset or0, and three threads whenRAILS_MAX_THREADSis unset.
GUNICORN_CMD_ARGS or a gunicorn.conf.py file, Laravel Cloud uses the memory-based estimate instead.
Event loop runtimes
Laravel Rust, Laravel Go, Go, Rust, Node.js, Bun, Deno, and FastAPI applications serve many requests at once. Their capacity comes from load tests of each runtime, multiplied by the vCPUs the application can use and rounded down:
For example, a Go application on a 2 vCPU instance handles 696 requests in flight per replica, while a Node.js application on the same instance handles 181, because Node.js runs your application in a single process.
FastAPI uses these values only with the Uvicorn start command Laravel Cloud generates, which runs
WEB_CONCURRENCY workers. With a custom start command or another server, FastAPI applications use the memory-based estimate. Applications on other runtimes use the memory-based estimate as well.
Disabling HTTP traffic autoscaling
Requests that stay open, such as server-sent event streams and long polling, count as in-flight requests for as long as they remain open. An application holding many of them may add replicas even when it has spare capacity. To scale these applications on CPU and memory only, add the following variable to your environment variables and redeploy your environment:Scheduled autoscaling
Scheduled autoscaling is available on the Business and Enterprise plans. It lets you define time-based overrides for clusters that scale between a minimum and maximum number of replicas. Overrides are useful for predictable traffic patterns like product launches, marketing campaigns, or business hours. Each scheduled override temporarily changes your cluster’s:- minimum replicas
- maximum replicas
- CPU threshold
- memory threshold
Laravel Cloud applies scheduled autoscaling changes automatically around the configured boundary times, typically within about one minute.
Scheduled autoscaling limitations
- Scheduled autoscaling is available only for clusters that scale between a defined minimum and maximum replica count.
- Recurring schedules must start and end on the same day. If you need an overnight window, create two schedules.
- One-time schedules run once, then automatically stop applying after their scheduled window ends.
Compute classes
Laravel Cloud applications run on the latest generation of AWS Graviton EC2 servers, which have an optimized cost-to-performance ratio. Laravel Cloud offers two classes of compute:Flex
Lightweight and cost-efficient. A good fit for development environments or applications that need the flexibility to support periodic traffic bursts.
Pro
Larger compute sizes designed for sustained, heavy utilization. Best for large-scale, mission-critical production applications.
Compute metrics
To view your environment’s compute metrics, open the Metrics tab of your environment. For your environment’s App and worker clusters, the charts show CPU usage averaged across all replicas and the memory usage of the busiest replica. See Compute metrics for what each chart means.Scale to zero
Your environment can scale to zero when it does not receive an inbound network request to your application (port 8080) within a specified time limit, known as the sleep timeout. While an environment is sleeping, Laravel Cloud does not charge you for its compute until it wakes again. New Flex compute sizes wake in under 500 milliseconds when the environment receives a new inbound request, which is fast enough that your application’s users will not notice. Legacy Flex sizes use the previous wake behavior and typically take 5-20 seconds to wake. To enable scale to zero, click your environment’s App cluster on the infrastructure canvas dashboard and enable the Scale to zero toggle. Then, save the compute cluster settings and redeploy the environment.Scheduled tasks and queues
For Laravel Rust and Laravel PHP applications, a sleeping environment wakes automatically to run scheduled tasks. For applications that use scheduled tasks, Cloud wakes the App cluster to run commands on the schedules you configure in Cloud. Queued jobs do not wake a sleeping environment. If your jobs must keep processing while your environment sleeps, use managed queues or a worker cluster that stays awake. If you use Symfony’s Scheduler component instead of Laravel Cloud’s scheduled tasks, run it on an always-awake worker cluster. When your environment wakes for a scheduled task or a manual wake interval, it stays awake for the duration of the sleep timeout. Any inbound request resets this timer. Make sure your scheduled tasks and background processes can complete within that window.If a queued job is still running when the sleep timeout elapses, the App cluster will stop and the job may be interrupted. We recommend managed queues for queued jobs so that scale to zero never interrupts background processing.
Manual wake interval
You may configure a manual wake interval to wake an environment on a fixed schedule, which is useful for self-managed background processes, such as queue workers, that must run periodically. As with scheduled tasks, a wake interval shorter than your sleep timeout can keep the environment awake continuously.Worker clusters
Each worker cluster can either stay awake at all times or follow the App cluster and sleep alongside it. You may configure this behavior within the worker cluster’s settings.Limitations
- Only Flex compute sizes can scale to zero.
- Sub-500 millisecond wake times apply to new Flex sizes only. Legacy Flex sizes keep their previous wake behavior.
Maintenance mode
This section applies to Laravel applications. Symfony applications handle maintenance mode differently.
file driver for maintenance mode. If you run php artisan down from the Commands tab, the maintenance mode state will not persist across deployments or apply to multiple replicas.
To keep the maintenance mode state consistent across your application and its replicas, set the maintenance mode driver to cache and use either a database or Laravel Valkey (Redis-compatible) as the maintenance mode state backend in your environment variables.

