What is a Server?
A server is just a computer that runs continuously and waits for requests. When you load a website, a server somewhere in the world responds.
The client-server model
Every interaction on the web is a conversation:
- Client (your browser, phone, or app) sends a request: “Give me the homepage of example.com”
- Server receives the request, processes it, and sends a response: the HTML of the homepage
- Client receives and displays the result
This request-response pattern underpins everything: loading a web page, calling an API, sending a form, streaming a video. The details vary; the model is always the same. More: Client-server model, MDN
What makes a server different from your laptop?
Physically, almost nothing. A server is a computer with a CPU, RAM, and storage. What differs:
- Always on, servers run 24/7. A web app cannot go offline at night.
- No screen, servers are managed remotely via the terminal (SSH), not by sitting in front of them.
- Optimised for throughput, servers handle thousands of simultaneous connections; your laptop handles one.
- Located in data centres, dedicated buildings with backup power, cooling, redundant internet connections, and physical security.
- Accessible by IP address, anyone with the right credentials can connect from anywhere in the world.
A laptop could technically be a server. In fact, your computer is a server when you run npm run dev, it listens on port 3000 and responds to requests from your own browser.
Types of servers
| Type | Role | Examples |
|---|---|---|
| Web server | Serves static files over HTTP | nginx, Apache |
| Application server | Runs backend code, processes requests | Node.js, Python (Gunicorn), Go |
| Database server | Stores and retrieves structured data | PostgreSQL, MySQL, Redis |
| File/object storage server | Stores and serves files, images, videos | S3, Cloudflare R2, MinIO |
| Email server | Sends and receives email | Postfix, SendGrid |
| Cache server | Stores frequently accessed data in memory | Redis, Memcached |
| Reverse proxy | Sits in front of other servers, routes and load-balances | nginx, Cloudflare |
In practice, one physical machine often runs several of these simultaneously. A small startup might run their entire stack on a single server. A large company might have hundreds of servers for each role.
Containers: solving “it works on my machine”
A classic problem: code works on your laptop but fails when deployed to the server. Different operating systems, different library versions, different configurations.
Docker solved this. You define your application and its dependencies in a Dockerfile. Docker packages everything into a container, a portable unit that runs identically on any machine with Docker installed. More: Docker getting started
FROM python:3.12
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "app.py"]This container will run exactly the same on your laptop, on AWS, on Google Cloud, or in any data centre. No “works on my machine” anymore.
Kubernetes orchestrates containers at scale, deciding which server runs which containers, restarting failed containers, scaling up under load. Most large deployments use it. More: Kubernetes
Serverless: code without infrastructure
Serverless platforms (AWS Lambda, Cloudflare Workers, Vercel Functions, Netlify Functions) let you deploy individual functions rather than whole applications. You write a function, push it, and the platform:
- Runs it on request
- Scales automatically from zero to millions of executions
- Bills you per invocation, not per hour
For a simple API endpoint or a webhook handler, serverless is often the simplest and cheapest option. For long-running processes or stateful applications, it is less suitable.
Where to host your first project
| Platform | What it is | Best for |
|---|---|---|
| Vercel | Serverless deployment with Git integration | Next.js, React apps, APIs |
| Railway | Simple container hosting | Any backend, databases |
| Render | PaaS with free tier | APIs, web services, cron jobs |
| Fly.io | Container deployment close to users | Low-latency global apps |
| AWS / GCP / Azure | Full cloud platforms | Production apps, complex infrastructure |
| DigitalOcean | VPS and managed services | More control than PaaS, less than raw AWS |
For a prototype or demo: start with Vercel, Railway, or Render. You push code from GitHub and it deploys in minutes. No server management required.
The request lifecycle
What actually happens when someone visits your web app:
- Browser resolves the domain to an IP address via DNS
- TCP connection established with the server
- Browser sends HTTP request
- nginx (or another reverse proxy) receives it, passes to your app server
- Your app server runs your code: reads the request, queries the database, applies logic
- Database server returns data
- App server formats the response (JSON, HTML)
- nginx sends the response back to the browser
- Browser renders the result
This happens in under 100ms for well-optimised apps.

Further reading
- What is a web server?, MDN
- DigitalOcean Tutorials , some of the best practical server administration guides on the internet, free
- Docker getting started , official guide, good for understanding containers from scratch
- How nginx works, nginx beginner’s guide
- The Twelve-Factor App , methodology for building deployable, maintainable web apps
- ByteByteGo on YouTube , system design and infrastructure explained with excellent diagrams
What’s next
Next: What is the Cloud? , what “the cloud” actually means and why everyone moved there.
Frequently asked questions
