Small Server Fit
Prevent avoidable deployment rework by checking application requirements against a measured server budget before committing to an image, runtime, or instance size.
Establish the two sides of the fit
Inspect the repository for:
- frontend build tool and whether static assets can be built locally or in CI;
- backend runtime and exact version constraints;
- lockfiles, native extensions, browser binaries, machine-learning model artifacts, and serializer versions;
- steady processes, intended worker count, background jobs, databases, uploads, logs, and temporary build space;
- representative validation flow and concurrency expectation.
Obtain a current or candidate server profile containing OS image, architecture, vCPU, RAM, swap, disk and free space, available runtime versions, and platform services. Use references/profile-schema.md for the evidence contract.
If the host does not exist yet, mark runtime measurements NOT MEASURED and separate image compatibility from capacity claims. Do not treat a purchase date or marketing label as proof of installed runtime versions.
Make the fit decisions
Evaluate these independently:
- Operating-system and architecture fit: application binaries and native packages support the image and architecture.
- Runtime fit: an application-specific Python, Node.js, or Java runtime can be installed without replacing a system-owned runtime.
- Build fit: peak dependency installation and build memory and disk fit, or the build can move to a local machine or CI.
- Runtime memory fit: measured or bounded steady processes leave headroom for the OS, Nginx, SSH, logs, and short spikes.
- Persistence fit: state is outside immutable release directories and backups fit the disk or an external store.
- Operations fit: the service can restart, recover after reboot, expose only intended ports, and produce bounded logs.
Run scripts/evaluate_fit.py --profile <profile.json> when numeric evidence is available. The script calculates margins; it does not invent missing workload measurements.
Prefer changes in this order
- Build the SPA or Java artifact outside the small server.
- Isolate the application runtime instead of upgrading system binaries.
- Reduce the process or worker count when the workload and state model permit it.
- Move databases, object storage, or heavy build jobs to a managed or external service when justified.
- Add swap only as a bounded resilience measure, not as a substitute for required RAM.
- Increase the instance size when measured steady-state plus safety margin still does not fit.
Never recommend downgrading security, removing backups, disabling verification, or co-locating incompatible state merely to claim fit.
Output
Report each dimension as FIT, FIT WITH CHANGES, NOT FIT, or NOT MEASURED. Include:
- the recommended OS image and runtime isolation method;
- local or CI versus server build split;
- process and worker budget;
- RAM and disk arithmetic with source measurements;
- model and native dependency compatibility risks;
- the smallest safe next measurement or experiment;
- a purchase recommendation only when evidence supports it.
Distinguish a confirmed fact, calculation, assumption, and recommendation. A useful result can be NOT MEASURED; false precision cannot.


