What is a server? Explained with a kitchen that never closes
A server is a computer and its software that stay on, receive requests and send back pages, files or data. Explained with a kitchen that never closes: orders go in, dishes come out.
- Author
Umair Mateen- Published
- Reading time
- 5 min
- Category
- Engineering
In one sentence: A server is a computer, and the software running on it, that stays switched on and connected so it can receive requests from other devices and send back what they asked for, such as a web page, a file or a record.
The everyday picture
Picture a kitchen that never closes. It has a street address, the lights are always on, and someone is always ready at the stove. Diners do not walk into the kitchen. They send in an order, and a finished dish comes back out.
The kitchen has two parts. There is the room itself, with its stoves, fridges and shelves. And there is the cook, who reads each order, knows the recipes and decides what to plate. An empty kitchen with no cook serves nobody, and a cook with no kitchen has nowhere to work.
A server is this kitchen. Your phone or laptop is the diner. Every time you open a website or an app, your device sends an order to a server somewhere and waits for the dish.
Your browser (the diner) sends an order to the server (the kitchen). The server software (the cook) fetches what it needs from the database (the pantry) and sends the finished page back.
How it works, step by step
- The request (the order): your browser or app is called the client. It sends a request to the server's address, usually written in HTTP, the shared language browsers and web servers use to talk to each other.
- The server hardware (the kitchen): a computer built to run all day and night, connected to the internet. It stores the files and programs a website needs. Many sit in data centres, buildings full of servers run by hosting and cloud providers.
- The server software (the cook): a program on that computer, such as a web server, that understands requests. It reads each order and works out what to send back. The word "server" can mean the machine, the program, or both working together.
- Ready-made or cooked to order (a sandwich from the shelf or a fresh meal): a simple page can be sent exactly as it is stored. A personal page, like your account or your basket, is put together on the spot: the software fetches ingredients from a database (the pantry) and fills in a template.
- The response (the dish going out): the server sends the result back, with a short status code. "200 OK" means here is your dish. "404" means that item is not on the menu. Your browser then lays it out on your screen.
Try it · Everyday ↔ real
Match the kitchen to the real thing
Switch between the two and see how each part lines up.
- The diner placing an order
- The written order
- The kitchen room and stoves
- The cook reading the order
- The pantry
- The dish sent out
A kitchen that never closes
| Everyday | Real |
|---|---|
| The diner placing an order | Your browser (the client) |
| The written order | An HTTP request |
| The kitchen room and stoves | The server hardware |
| The cook reading the order | The server software |
| The pantry | The database |
| The dish sent out | The response, such as a web page |
Where the picture stops
- A cook may remember a regular diner's usual order. A web server does not: HTTP is "stateless", so each order arrives as if from a stranger. Sites use extra tools, such as cookies, to recognise you from one request to the next.
- A real kitchen is one room. One physical server can be split into several "virtual" servers, each acting like its own separate kitchen. A cloud server is usually one of these, rented from a provider who looks after the building and the machines.
- "Never closes" is the goal, not a promise. Servers go offline for maintenance, power cuts or faults. Busy services run several servers so one can take over when another stops.
Why it matters for your business
- Customers: if your server is slow or down, your website, app or online shop is slow or down for every customer at once.
- Cost: you can own physical servers, or rent cloud servers and pay for what you use. Renting moves the upkeep of the building and machines to the provider.
- Risk: a server holds your files and often your customers' data. Who can reach it, how it is updated and how it is backed up are business decisions, not just technical ones.
- Growth: as orders grow, you can move to a bigger server or add more of them. Planning for that early avoids a rushed move later.
Try it · Myth or fact
Servers: myth or fact?
Decide for yourself first, then tap each statement to check it.
0 of 4 checked
An example
Imagine a small bakery that takes cake orders online. Its website runs on one rented cloud server. When a customer opens the menu page, the server sends a page that is the same for everyone. When the customer checks their order, the server fetches that order from the database and builds a page just for them. During a holiday rush, pages start to load slowly, so the bakery's developer moves the site to a larger server and sets up a second one that can take over if the first one stops.
Frequently asked questions
Is a server just a computer?
Yes, in hardware terms. What makes it a server is its job: it runs software that answers requests from other devices, and it is usually built and set up to stay on and connected all the time.
What is the difference between a server and the cloud?
The cloud is a way of renting servers instead of owning them. A cloud server is often a virtual server running on a provider's physical machines, which the provider maintains in its data centres.
Can my laptop be a server?
Technically, yes. Developers often run a small server on their own laptop while building a site. For real customers, a server needs to stay on, stay connected and be looked after, which is why most sites use hosting.
What does "the server is down" mean?
It means the server cannot answer requests right now, perhaps because of maintenance, a fault or too much traffic. Your device sends its order, but no dish comes back, or an error does.
Related explainers
- Frontend vs backend, explained with a restaurant
- What is cloud hosting? Explained with a serviced office
- What is a database? Explained with a filing cabinet and its index
- What is DNS? Explained with your phone's contacts list
The DevDrift sets up and runs the servers behind the platforms it builds: see how.
Sources
Could you explain this to a colleague now?
Mark it and posts that mention it will show a tick. Saved in this browser only.