Hosting operations3 minutes to read

How to size one hosting plan for two bots and a website

Work through a concrete memory, CPU and storage budget for a Discord bot, a Telegram bot and a website on one shared hosting plan.

Write down what runs at the same time

Picture a community running a Discord moderation bot, a Telegram announcements bot and a small website. They need three deployments even when the Telegram bot only handles a few messages a day. Count the processes that must be available independently. A scheduled task that lives in its own deployment also counts while waiting for its next run.

Record memory at startup and during a representative busy period. Record CPU while the bot handles several events or the site serves several requests. On disk, count dependencies, build output and application data as well as the source repository. These measurements will be specific to your code.

Draft a budget for the three deployments

Suppose your measurements suggest allocating 768 MB of memory to the Discord bot, 256 MB to the Telegram bot and 512 MB to the website. That totals 1,536 MB. If you allocate 40%, 15% and 25% CPU respectively, the total CPU reservation is 80%. Giving the deployments 3 GB, 1 GB and 2 GB of storage brings the storage total to 6 GB.

Circuit has 2 GB of memory, 100% CPU, 8 GB storage and four deployment slots. The example leaves 512 MB of memory, 20% CPU, 2 GB of storage and one deployment available. Relay is smaller on three resource dimensions and supports only two deployments. For these particular reservations, removing a single file or optimizing one handler would not make all three workloads fit Relay.

Measure startup and a real update

Watch the first dependency install and the next code update as well as the steady process. A static site may use little CPU while serving a file but consume much more during its build. A Discord bot can use more memory as its cache fills. A scheduled Python job may reach peak usage just as the website is rebuilding.

Keep the intended test close to what users do. Run a moderation action in a test server, deliver a message to the Telegram bot, and request the site while it is serving the updated revision. Use the deployment console and resource view to tell a failed startup from a slow response.

Decide which limit to change

If one deployment needs more memory and the account has spare capacity, raise its allocation. If the account is full, find a deployment with unused reserved capacity and reduce it safely, or choose a larger account plan. Check the disk usage before shrinking a volume. Keep useful copies of data you intend to remove.

Use the monthly and annual plan comparison for current prices and limits. Follow the account pool guide when you are ready to allocate resources. For HTTP workloads, verify the public route using the HTTPS guide.