# Where Backends Run: Hosting Options

> Compare shared hosting, VPS, PaaS, containers and serverless so you can put a real app online. Free notes, key concepts, resources and a mini project.

Canonical: https://www.internhack.in/roadmaps/tracks/backend/hosting-basics
Last updated: 2026-11-28

Compare shared hosting, VPS, PaaS, containers and serverless so you can put a real app online.

Beginner · about 5 hours · difficulty 2/5

Learn first: [DNS and Domain Names](https://www.internhack.in/roadmaps/tracks/backend/dns)

Your code has to run on some computer that is reachable from the internet. The options form a spectrum from "you manage everything" to "you manage almost nothing":

- **Virtual private server (VPS)**: a rented Linux machine (for example from DigitalOcean, Hetzner, Linode or an EC2 instance). Full control, but you patch the OS, configure the firewall and keep the process running.
- **Platform as a Service (PaaS)**: you push code or a container and the platform builds, runs, scales and gives you HTTPS (Render, Railway, Fly.io, Heroku, Google Cloud Run). Great for learning and small teams.
- **Managed containers / Kubernetes**: you ship images and the platform schedules them. More power, more concepts.
- **Serverless functions**: you upload handlers that run per request (AWS Lambda, Cloudflare Workers). No servers to manage, but cold starts and execution limits apply.

### The big three cloud providers

AWS, Google Cloud and Azure offer all of the above plus managed databases, queues and storage. You do not need to learn them all; learn the concepts (compute, storage, networking, IAM) once and they transfer.

### What to watch for

- **Cost surprises**: egress bandwidth, idle databases and forgotten resources add up. Set budget alerts.
- **State**: a process on a PaaS can be restarted at any time, so never store uploads or sessions on local disk.

You are ready to move on when you have deployed at least one app to a PaaS and one to a plain VPS, and can explain the trade-off you felt between them.

## Key concepts

- **VPS and bare virtual machines**
- **PaaS platforms**: Fastest way to get something online.
- **Serverless functions**
- **AWS, GCP and Azure basics**
- **Environment variables and config**
- **Cost and budget alerts**

## Mini project

Deploy the same hello-world API twice: once to a free PaaS tier and once to a small VPS behind a firewall with only ports 22, 80 and 443 open.

## Check yourself

Why is saving user uploads to the local filesystem risky on most PaaS platforms?

## Free resources

- [What is the cloud?](https://www.cloudflare.com/learning/cloud/what-is-the-cloud/) (Cloudflare)
- [Render documentation](https://render.com/docs) (Render)
- [Heroku Dev Center](https://devcenter.heroku.com/) (Heroku)

Previous: [DNS and Domain Names](https://www.internhack.in/roadmaps/tracks/backend/dns) · Next: [Linux and the Command Line](https://www.internhack.in/roadmaps/tracks/backend/linux-terminal)

## More in How Requests Reach Your Server

- [How the Internet Moves Data](https://www.internhack.in/roadmaps/tracks/backend/internet-basics)
- [HTTP in Depth](https://www.internhack.in/roadmaps/tracks/backend/http-protocol)
- [DNS and Domain Names](https://www.internhack.in/roadmaps/tracks/backend/dns)
- [Where Backends Run: Hosting Options](https://www.internhack.in/roadmaps/tracks/backend/hosting-basics)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Backend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/backend)
