Learning Objectives

By the end of this chapter, you will be able to:

  • Define client-server architecture.
  • Describe the role of a client.
  • Describe the role of a server.
  • Explain the request-response model.

The Client-Server Architecture

Client-server architecture is the fundamental design model of the internet. It is a computing model in which a server hosts, delivers, and manages most of the resources and services to be consumed by one or more clients.

The Client

The client is a computer or program that requests services or resources from a server. The client is the device that the end-user interacts with.

  • Examples: Your web browser is a client. When you type in a web address, your browser (the client) sends a request to a web server.

The Server

The server is a powerful computer or program that is dedicated to providing services to clients. Servers wait for requests from clients and then respond to them.

  • Examples: A web server stores website files and serves them to web browsers. A mail server stores and delivers email.

The Request-Response Model

Client-server architecture works on a request-response model:

  1. The client sends a request to the server (e.g., “get me the homepage for google.com”).
  2. The server receives the request, processes it, and sends a response back to the client (e.g., the HTML code for the Google homepage).
  3. The client receives the response and displays it to the user.

Summary

The client-server architecture is the foundation of how the internet works. In this model, a client (like your web browser) sends a request to a server (like a web server). The server then processes the request and sends a response back to the client. This simple but powerful request-response model enables all of the services we use on the internet today.

Key Takeaways

  • Client-server is the fundamental architecture of the internet.
  • The client requests services; the server provides them.
  • The model works on a request-response cycle.

Discussion Questions

  1. When you use a mobile app like Instagram, which part is the client and which part is the server?
  2. What are some of the advantages of the client-server model?
  3. Can a computer be both a client and a server? Explain.