Log inSign up

VPS for web apps: workers, databases and transfer math

A small PHP or Node app with its database fits on F2-4 with 2 vCPU, 4 GB RAM, 128 GB NVMe; the real sizing work is counting workers against memory and page weight against 3 TB of transfer.

How do you size a server for a web app?

Count memory per worker, add the database and the OS, and choose the smallest plan that leaves a quarter of RAM free. CPU is rarely the first wall for a typical web app; memory is. Each PHP-FPM child, each Node process and each Gunicorn worker holds its own copy of your code and data, so the worker count you can afford is set by RAM.

  • OS, SSH, web server: about 300~500 MB.
  • MariaDB or PostgreSQL for a small app: 500 MB to 1 GB with sensible buffers.
  • Redis for sessions and cache: 50~200 MB.
  • Application workers: whatever is left, divided by the size of one worker.

On F2-4 with 2 vCPU, 4 GB RAM, 128 GB NVMe, that usually leaves about 2 GB for workers. High Frequency cores also shorten the time each request holds a worker, which is the second half of throughput.

How many PHP-FPM workers can you run?

Divide the memory left for PHP by the average size of one child, then round down. Measure the real size on your app instead of trusting a rule of thumb:

ps -C php-fpm8.3 -o rss= | awk '{s+=$NF; n++} END {print s/n/1024 " MB avg over " n}'

If one child averages 60 MB and you have 2 GB for PHP, set about 30 children. In /etc/php/8.3/fpm/pool.d/www.conf:

pm = dynamic
pm.max_children = 30
pm.start_servers = 6
pm.min_spare_servers = 4
pm.max_spare_servers = 10
pm.max_requests = 500

Turn on OPcache with enough memory for your code (opcache.memory_consumption=192 is a reasonable start), because recompiling PHP on every request wastes the fast cores you are paying for.

Plans for this workload

Smallest first, at the base city price. Order totals are the shortest prepaid term that reaches $40.

PlanWhySizeMonthlyOrder from
F1-2single small app with SQLite or a light database1 vCPU, 2 GB RAM, 64 GB NVMe$7.20/mo$43.20 for 6 months
F2-4PHP or Node app plus MariaDB or PostgreSQL and Redis2 vCPU, 4 GB RAM, 128 GB NVMe$14.40/mo$43.20 for 3 months
F3-8busier app, more workers, bigger database buffers3 vCPU, 8 GB RAM, 256 GB NVMe$28.80/mo$86.40 for 3 months
I4-12production app in any of the 32 cities4 vCPU, 12 GB RAM, 260 GB NVMe$43.20/mo$43.20 for 1 month
I8-16many workers and a large database on one box8 vCPU, 16 GB RAM, 350 GB NVMe$57.60/mo$57.60 for 1 month

How do you run Node apps in production?

Run one process per vCPU behind a reverse proxy, and restart them automatically. Node is single-threaded per process, so on F2-4 two processes use both cores. You can use the built-in cluster module, a process manager such as PM2 (pm2 start server.js -i max followed by pm2 startup), or one systemd unit per port:

# /etc/systemd/system/app@.service
[Service]
User=app
WorkingDirectory=/srv/app
Environment=PORT=%i NODE_ENV=production
ExecStart=/usr/bin/node server.js
Restart=always

systemctl enable --now app@3001 app@3002

Put Caddy or nginx in front to terminate TLS and balance across the ports. The Caddy HTTPS tutorial covers certificates in a few lines of config.

How much transfer does a web app use?

Multiply page weight by page views, then add API and asset traffic. A page that loads 1.5 MB on a first visit and about 300 KB on later visits (thanks to caching) averages well under 1 MB per view for returning users. At 100,000 page views a month that is roughly 100 GB, a small share of the 3 TB on F2-4.

Where transfer climbs is media: user uploads, video, large downloads and image galleries served without compression. Serve images in WebP or AVIF, enable gzip or Brotli in the web server, and set long cache headers for static files. Watch the outgoing graph on the Usage tab for the first month, since we do not sell additional transfer.

Which city should a web app run in?

Put it near the bulk of your users, and near any third-party API it calls on every request. A store selling in Latin America reaches people faster from Mexico City or Sao Paulo; Indian audiences from Mumbai; a European SaaS from Frankfurt or Paris. Sao Paulo carries a 50% higher price, so F2-4 there is $21.60 a month against $14.40 elsewhere; Miami is a common lower-cost alternative for South American traffic.

For data residency, keeping the server inside a specific country is as simple as picking that city. We list 32, and each city page shows which plans it carries.

When should you move to a bigger plan?

Move when memory stays above about 80% at peak, when the FPM log keeps warning that max_children was reached, or when database queries start waiting on disk. Before upgrading, look for cheap wins: slow query logs, a page cache, fewer plugins or dependencies. When it is time, the next steps are F3-8 with 3 vCPU, 8 GB RAM, 256 GB NVMe and, on the latest-generation Intel line, I4-12 and I8-16, which are sold in every one of our cities.

How do you deploy updates without downtime?

Keep releases in timestamped folders and switch a symlink, then reload rather than restart. For PHP, ln -sfn /srv/releases/2026-12-03 /srv/current && systemctl reload php8.3-fpm swaps code while existing requests finish. For Node, restart one port at a time behind the proxy. Keep the last two releases so a rollback is one symlink away.

Web apps questions

PHP, Node or Python: does the plan change?

Not much. The method is the same: memory per worker times worker count, plus the database. Python apps under Gunicorn often have larger workers than PHP children.

Should the database live on the same server?

For small and medium apps, yes, it keeps latency at zero. Separate it when it needs more memory than the app, on a second instance in the same city.

Can I send email from my app?

Ask support before planning any outgoing mail from the server. Many apps send through an external mail API over HTTPS instead.

Do you provide a control panel?

The instance ships without a hosting panel. You get full root on a clean OS or one of the six app images, and install whatever stack you like.

Is there a load balancer?

We do not sell load balancers or private networking. A reverse proxy on one instance spreading traffic over local workers covers most apps.