Scaling Your Infrastructure
Scaling your hosting infrastructure is crucial for ensuring high availability, performance, and flexibility of services. In the ecosystem of PteroCA and Pterodactyl, scaling involves adding new nodes to a single instance of the Pterodactyl panel, allowing efficient management of multiple game servers.
🧩 How PteroCA works
PteroCA serves as a client-facing interface that interacts with your Pterodactyl panel through its API. It maintains essential metadata about purchased servers - such as specifications, billing details, and user associations—within its own database. This information is crucial for managing user accounts, billing, and service provisioning.
However, the actual server configurations, deployments, and runtime management are handled by Pterodactyl. All operational aspects, including server creation, resource allocation, and lifecycle management, occur within the Pterodactyl environment. PteroCA does not directly manage or store the operational data of the game servers themselves.
This separation ensures that while PteroCA manages the business and user interaction layer, Pterodactyl remains responsible for the technical management of game servers.
🏗️ Scaling Pterodactyl
1. Single Panel Instance
It's recommended to maintain a single instance of the Pterodactyl panel that manages all nodes. This architecture simplifies management and allows centralized monitoring of all servers.
2. Adding new nodes
To increase resources, you can add new nodes to the existing panel instance:
Create a Location: In the Pterodactyl panel, navigate to the Locations section and add a new location to group nodes by physical location or purpose.
Add a New Node: In the Nodes section, click Create New and fill in the required information, such as:
Node name
Description
Location
FQDN (Fully Qualified Domain Name)
Ports for Daemon and SFTP
Server file directory
Install Wings on the New Node: Wings is the daemon responsible for managing Docker containers on the node. Install it according to the official documentation.
Configure Wings: After installing Wings, configure the
config.yml
file according to the data generated in the Pterodactyl panel for the new node.Start Wings: After proper configuration, start Wings on the new node.
3. Resource Allocation Configuration
For each node, you can specify resource limits:
RAM: Total amount of memory available for servers on the node.
Disk: Total disk space available for servers.
CPU: While Pterodactyl doesn't allow direct CPU limitation at the node level, you can manage these settings at the individual server level.
4. Horizontal Scaling
By adding additional nodes, you can evenly distribute the load among them, allowing you to handle more servers and users without losing performance.
⚙️ Configuring API Rate Limits
In cases of intensive use of the Pterodactyl API, it's advisable to adjust the request limits to avoid errors related to exceeding limits:
In the .env
file of the Pterodactyl panel, you can set:
APP_API_CLIENT_RATELIMIT=720
APP_API_APPLICATION_RATELIMIT=240
These settings increase the request limits for clients and applications, which is particularly useful when integrating with PteroCA.
🧪 Testing and monitoring
After adding new nodes and configuring API limits, it's recommended to:
Monitor Node Status: In the Pterodactyl panel, check the status of each node to ensure it's functioning correctly.
Test Server Creation: Create a test server on the new node to ensure everything works as expected.
Analyze Logs: Regularly check the Wings and Pterodactyl panel logs to detect any errors or warnings.
📚 Further steps
Last updated