• 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.

Common servers
Kind of serverWhat it provides
File serverStores shared files and folders that many users can open
Print serverLets many computers use one printer
Web serverSends web pages to browsers
Mail serverStores and delivers email
Database serverKeeps 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.

The two designs compared
PointClient-serverPeer-to-peer
Central computerYes, the serverNo
CostHigherLower
Security and backupManaged centrallyLeft to each user
SuitsSchools, banks, large officesHomes 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. 1. In a client-server network, which computer sends a request?

    1. The client
    2. The server
    3. The switch
    4. The cable
    Show answer

    Answer: A. The client asks for a service and the server answers the request.

  2. 2. A computer that stores and delivers email is called a:

    1. Print server
    2. Web server
    3. Mail server
    4. File server
    Show answer

    Answer: C. A mail server stores and delivers email messages.

  3. 3. Which design needs no central computer?

    1. Client-server
    2. Peer-to-peer
    3. Star only
    4. Internet only
    Show answer

    Answer: B. In peer-to-peer every computer is equal, so there is no central server.

  4. 4. A bank wants strong central security and nightly backups for its branches. Which design suits it?

    1. Peer-to-peer
    2. A single home router
    3. A pair of laptops
    4. Client-server
    Show answer

    Answer: D. Central security and backups are managed on a server, which is the client-server design.

  5. 5. Which is a drawback of a peer-to-peer network?

    1. It needs an expensive server
    2. It cannot share printers
    3. Security is left to each user
    4. It needs a central cable
    Show answer

    Answer: C. With no central control, each user is responsible for their own security and backup.

Privacy · Terms · Refunds · Delivery