A Madrid VPS can stay well within its monthly transfer allowance and still slow down every evening when a backup starts. To size the connection, calculate two numbers: how much data the server transfers in a month and how fast it must move that data during its busiest period. The first helps you choose an allowance in GB or TB. The second tells you whether the available port speed in Mbps can support a backup, customer downloads and ordinary API traffic at the same time.
Monthly visitor counts tell you little about either number. A warehouse integration in Lisbon might poll a Madrid API all day without registering a single website visit. Meanwhile, three customers downloading the same product catalog generate three transfers, even though the file occupies disk space only once.
Build a monthly estimate from the work the server does
Consider a hypothetical distributor that hosts its ordering API in Madrid, sends backups to off-site storage and lets retailers download a catalog. The following estimate uses a 30-day month and decimal units, where 1 GB equals 1,000 MB. All figures represent outbound traffic from the VPS.
|
Workload |
Assumption |
Monthly outbound transfer |
|
Ordering API |
200,000 responses per day averaging 12 KB each |
72 GB |
|
Nightly off-site backup |
8 GB sent each night for 30 nights |
240 GB |
|
Retailer catalog |
400 completed downloads of a 150 MB file |
60 GB |
|
Total |
372 GB |
Backups account for nearly two-thirds of the estimated transfer. That changes where the distributor should spend its time. Trimming 10% from every API response would save 7.2 GB per month. Reducing each nightly backup upload from 8 GB to 6 GB would save 60 GB, provided the revised backup still meets the recovery requirements.
Measure API responses where they leave the server
For an existing API, sample a full business week and group responses by endpoint. A stock lookup may return a few fields, while an inventory export returns thousands of records. Count both the frequency and the bytes sent for each group. A simple average of those two response sizes would give a rarely requested export the same weight as a lookup called every minute.
NGINX can record $bytes_sent in its access log. Sum that field over the reporting period to estimate HTTP traffic leaving the server. Keep the export endpoint visible as a separate line item so you can see when one retailer changes its polling schedule. Then compare your total with the provider’s transfer meter for the same dates. An off-site backup sent over SSH will appear outside the web access log.
Size the backup window in minutes
The distributor’s 8 GB nightly upload needs about 35.6 Mbps of sustained outbound throughput to finish in 30 minutes. The calculation is 8 GB × 8,000 megabits per GB ÷ 1,800 seconds. That is the rate required for the backup data alone. The connection also carries protocol overhead and any other traffic active during that window.
Suppose retailers are downloading files at a combined 25 Mbps when the backup begins. Together, those two jobs already need about 61 Mbps before API responses enter the calculation. If the backup can run for an hour, its required average falls to about 17.8 Mbps. Moving the deadline can therefore solve a peak-capacity problem without changing the monthly transfer total.
Use the bytes reported by a completed backup job for this calculation. A 100 GB database might produce a much smaller compressed upload. Equally, a failed job that restarts from the beginning can send much of the same data twice. Check the transfer log after a retry to see which behavior your backup software delivers.
Test a download from the customer’s network
A retailer in Porto who needs a 150 MB catalog within one minute requires an average of 20 Mbps for that download. If five retailers start together and each expects the same completion time, the Madrid server must deliver about 100 Mbps of file data during that minute. Those five downloads add only 750 MB to the monthly bill, yet they can occupy a substantial share of the connection while they run.
Try that download from a representative Portuguese business connection while the backup is active. Record completion time and the response time of a small stock lookup. Repeat from Spain using the same file. A low ping to Madrid tells you that a small packet returned quickly. The timed download tells you whether a retailer can get the catalog before the morning ordering deadline.
Compare the estimate with the plan
Keep the 372 GB monthly estimate and the busiest transfer window side by side when you check Madrid VPS plans. Confirm which traffic directions count toward the allowance, whether the quoted port speed is shared or guaranteed, and what happens if usage crosses the allowance. A restore deserves its own calculation because pulling a backup into Madrid reverses the traffic direction.
After the first billing cycle, replace the assumptions with three observed figures: total metered transfer, the longest backup duration and catalog download time during the busiest interval. If monthly usage is comfortable but stock lookups slow down during the backup, test a schedule change or transfer-rate limit. If the connection stays responsive and monthly usage keeps growing, revisit the allowance. Each decision follows from a different measurement.