Sizing a small HTTP service
Estimate CPU, memory and disk for a small service, then check the result under representative load.
The numbers are illustrative. The example assumes one application process and a separate database.
CPU
At 40 requests per second and 25 ms of CPU time per request, demand is 40 × 0.025 = 1 full CPU core. At a target utilisation of 60%, start testing with two vCPUs if the application can use them in parallel.
Memory
Start with 600 MiB at idle and allow 8 MiB for each of 20 concurrent requests. That gives 600 + 20 × 8 = 760 MiB. Add 25% for the application and 512 MiB for the system to get 1,462 MiB. Use 2 GiB for the first test.
Disk
Allow 8 GiB for the system and app, 10 GiB for existing data, 15 GiB for 30 days of growth at 0.5 GiB per day, and 5 GiB for temporary files and logs. With 25% headroom, 38 × 1.25 = 47.5 GiB. Round up to 48 GiB for testing and budget separately for backups.
Validate under load
Record the application version, resource limits and idle usage. Run representative requests, including bursts and larger payloads. Measure CPU saturation, peak memory, disk growth, error rate and 95th-percentile latency. Adjust one limit at a time and run the same test again.