- Foundation
- About 12 min
- 5 practice questions
Client-server and peer-to-peer networks
Explain how clients and servers share work, name common kinds of server and decide when a peer-to-peer network is enough.
If something looks wrong, please tell us.
Once computers are joined into a network, the next question is how they will share work. There are two basic designs. In one, a powerful central computer serves all the others. In the other, every computer is equal. Knowing both designs, and when each suits a place, is a standard part of networking basics.
Clients and servers
A server is a computer, or a program, that provides a service to others. A client is a computer or program that asks for the service. When you open a web page, your browser is the client and the website's computer is the server. In a client-server network, the clients send requests and the server answers them. The server usually has a faster processor, more memory and more storage than the clients, and it runs all the time.
| Kind of server | What it provides |
|---|---|
| File server | Stores shared files and folders that many users can open |
| Print server | Lets many computers use one printer |
| Web server | Sends web pages to browsers |
| Mail server | Stores and delivers email |
| Database server | Keeps large sets of records that programs can search |
Peer-to-peer networks
In a peer-to-peer (P2P) network every computer has equal status. Each one can share its own files or printer with the others and can use what others share. There is no central server, so the network is cheap and quick to set up. The drawback is that security and backups are left to each user, and the network becomes difficult to manage as it grows.
| Point | Client-server | Peer-to-peer |
|---|---|---|
| Central computer | Yes, the server | No |
| Cost | Higher | Lower |
| Security and backup | Managed centrally | Left to each user |
| Suits | Schools, banks, large offices | Homes and small shops |
Worked examples
Example 1. Three friends in a flat connect their laptops to share a printer and a few files. There is no administrator and cost must be small. Which design? Peer-to-peer, because it needs no server and is simple.
Example 2. A school wants every student to log in with a personal account and keep files on a computer that is backed up each night. Which design? Client-server, because a central server can manage accounts, store the files and carry out the backups.
Example 3. You send an email. Which computer is the client and which is the server? Your mail program or phone is the client. The mail provider's computer that stores and delivers messages is the server.
The client asks. The server answers. In peer-to-peer, everyone can do both.
Common mistakes
- Thinking a server must be one very large machine. Any computer, or even a program, can act as a server.
- Thinking a computer can only be one or the other. A computer in a peer-to-peer network is both a client and a server.
- Forgetting that if the server fails in a client-server network, all clients lose that service.
Key takeaways. A server provides a service and a client uses it. Client-server gives central control and better security. Peer-to-peer is cheap and simple but suitable only for small groups.
Check your understanding
-
1. In a client-server network, which computer sends a request?
- The client
- The server
- The switch
- The cable
Show answer
Answer: A. The client asks for a service and the server answers the request.
-
2. A computer that stores and delivers email is called a:
- Print server
- Web server
- Mail server
- File server
Show answer
Answer: C. A mail server stores and delivers email messages.
-
3. Which design needs no central computer?
- Client-server
- Peer-to-peer
- Star only
- Internet only
Show answer
Answer: B. In peer-to-peer every computer is equal, so there is no central server.
-
4. A bank wants strong central security and nightly backups for its branches. Which design suits it?
- Peer-to-peer
- A single home router
- A pair of laptops
- Client-server
Show answer
Answer: D. Central security and backups are managed on a server, which is the client-server design.
-
5. Which is a drawback of a peer-to-peer network?
- It needs an expensive server
- It cannot share printers
- Security is left to each user
- It needs a central cable
Show answer
Answer: C. With no central control, each user is responsible for their own security and backup.
Sign in to keep track of the lessons you finish.