In this guide 6 sections
Choose a virtual machine for a steady app and a small team that knows Linux. Choose containers when you run several services or need repeatable deployments. Choose serverless for bursty or event driven work. Match the style to the load pattern and to the skills you have.
What each style asks of your team
A virtual machine is a whole server you rent. You install the runtime, patch the operating system, rotate logs and watch the disk. It is familiar, and a single developer can run one.
Containers package the app with its libraries. You still need somewhere to run them: a managed service such as ECS, Cloud Run or a Kubernetes cluster. Kubernetes in particular needs someone who understands ingress, secrets and upgrades.
Serverless functions remove the server from view. You upload code and the provider runs it on demand. The effort moves into limits, cold starts, timeouts and wiring the triggers together.
- VM: patching, SSH access, disk and backup care
- Containers: image builds, registry, orchestrator choice
- Serverless: function limits, event wiring, local testing
- Skills: Linux admin, Docker, then cloud service design
How each one scales
A virtual machine scales by getting bigger or by adding copies behind a load balancer. Both take minutes and need planning. If traffic doubles on a sale day, someone must have prepared that.
Containers scale faster. An orchestrator starts more replicas when CPU or queue length rises, and removes them afterwards. That works well when the app is stateless and sessions live in Redis or the database.
Serverless scales almost without effort, from zero to many parallel runs. The catch is downstream: your database may not survive a thousand simultaneous connections.
Cost at steady load and at bursty load
With steady traffic, a reserved or always on virtual machine is usually the cheapest and easiest to predict. You pay for capacity whether or not it is busy, but the bill is flat.
With bursty traffic, such as a payroll upload on the last day of the month or a webhook that fires in waves, serverless wins. You pay for execution time, and idle hours cost nothing.
Containers sit between. A managed container service that scales to zero behaves like serverless. A cluster that runs all day behaves like several virtual machines plus overhead for the control plane.
- Flat daily traffic: VM, with a reserved commitment
- Spiky traffic: serverless or scale to zero containers
- Many small services: containers on a managed platform
Matching the choice to the app you have
A monolithic Laravel or Django application with one database is a natural fit for a virtual machine, or a single container on a managed host. Splitting it into functions would add work without adding value.
A product with an API, a worker, a scheduler and a front end benefits from containers, because each part deploys and scales separately. Image tags also give you a clean way back after a bad release.
Image resizing, report generation, scheduled exports and webhook receivers suit serverless. They run briefly, rarely and independently of the main app.
A sensible way to decide
Score the app on three things: how uneven the load is, how many separate services it has and who will operate it at two in the morning. The third question is the one teams skip.
Most small companies should begin with the simplest style that fits, then move one part at a time. Putting a worker into a container or a nightly job into a function is a low risk first step.
Write down your load pattern and your on call person, then price the two closest options with real numbers from the provider calculator.
Hosting style decision sheet
A one page scoring sheet. Rows list the app’s parts, such as web tier, API, worker and scheduled jobs. Columns record load pattern, state held, current runtime, on call owner and the chosen style, with a last block for monthly cost under the two closest options.
Open a blank worksheet to printQuestions owners ask
Is Kubernetes necessary for a small business application?
Rarely. A managed container service or a plain virtual machine covers most needs. Kubernetes pays off when you run many services and have someone who can operate it.
Can we mix styles in one system?
Yes, and many do. A containerised API with serverless functions for background jobs is common. Keep the number of styles low so the team can support all of them.
Does serverless lock us in to one provider?
Partly. Function code moves easily, but triggers, permissions and event formats do not. Keep business logic in plain libraries and the lock in stays thin.
What is the cheapest option?
It depends on the load shape. Steady traffic favours an always on virtual machine. Occasional bursts favour serverless. Price both with your own traffic numbers.
