Configure static process allocation
This guide will help you use Static Process Allocation to ensure that a fixed number of processes are always available. You can also configure how upgrades roll out when your build changes.
To get started, go to the Hathora Console and open the application you want to configure. Navigate to Settings, scroll to Advanced Settings, and expand the Static Process Allocation section.
Set the following values for each region:
- Target: The number of processes you want to always be running.
- Min: The minimum number of processes that should remain running during an upgrade.
- Max: The maximum number of total processes (old + new) allowed during an upgrade.
Target must be less than or equal to Max and greater than or equal to Min.
Disable idle timeout
By default, idle processes are shut down after 5 minutes. To keep static processes running at all times, create a new deployment and disable Idle Timeout. This ensures that your static processes don’t restart due to inactivity.
Understand how upgrades work
When your build changes, Hathora will replace running processes with new ones while adhering to the limits you've set.
Static process allocation is greedy and will try to maintain Min and Max constraints while actively progressing the upgrade.
- At least Min old processes will stay online.
- Up to Max total processes (old + new) may be scheduled during the upgrade.
- Once enough new processes are ready, old ones are terminated to restore the Target count.
This gives you control over how much (if any) downtime you’re willing to tolerate during upgrades.
Use cases
Job queue workers
Use static processes to consume jobs from a queue:
- You can dynamically increase the Target to scale up your worker pool.
- Hathora’s autoscaler will monitor fleet utilization and automatically provision additional cloud resources as needed.
This setup works well for CI/CD or batch workloads.
Game servers
You can use static allocation to pre-warm game server processes. When you call CreateRoom
, the room will get assigned to one of these always-on processes. Make sure your server is idle-aware and can detect when a room is assigned.
Because the process is already running, the HATHORA_INITIAL_ROOM_CONFIG environment variable will not be populated when the room is assigned. If your server depends on this configuration, please contact our team for guidance.