Clients, servers and requests
What happens when you open a website?
A client is a program that asks for a service. A server is a program that provides one. When you open an online bookstore, your browser requests the catalog; the server finds the information and sends a response. The Internet is the connected network that lets the programs communicate. A server can also mean the computer running the server program.
The parts of an application
An application is software that performs a useful task. Compute means processing work using CPU and memory. Storage keeps data for later use; a database organizes data and provides ways to query or update it. Networking carries messages between components. These roles can all run on one computer or be distributed across several systems. For the bookstore, the app checks the requested book, the database holds its title and stock count, and storage can hold cover images.
Follow a request and response
HTTP is a protocol, or set of communication rules, commonly used on the web. In this simplified example, GET asks to retrieve information. The app receives a request for book 42, looks up its record, then replies. The response status 200 means the request succeeded; the response body contains the book data. A browser can display that data. The arrows below show messages, not a physical network map.
Illustrative HTTP exchange (body only shown after status)
Browser → Application: GET /books/42Application → Database: look up book 42Database → Application: title=Cloud Basics, stock=7Application → Browser: HTTP 200{"title":"Cloud Basics","stock":7}What if something goes wrong?
If book 99 does not exist, an application can return HTTP 404 (not found). If the app cannot access its database, it may return a server error instead, such as 500. These are different problems: the first is about a missing record, the second about processing the request. A server is not necessarily a dedicated physical machine, and a database is not automatically accessible to every browser. Keep database access behind the application unless there is a deliberate, secured alternative design.
Try it on paper
Draw a browser, bookstore application and database. Trace a request for book 42 and a response with its stock count. Then trace a request for a missing book. Identify which component sends each message and which component stores the stock count. No AWS account or programming experience is required. Next: learn where these components run.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Clients, servers and requests — knowledge check
Apply the concepts to the fictional bookstore and related scenarios.
A browser asks for book 42. Which component is the client?
Which component should maintain the authoritative stock count in this bookstore design?
A lookup succeeds and returns HTTP 200. What does that indicate?
Book 99 is absent, but the application and database are healthy. Which response fits?
The browser can reach the app, but the app cannot reach its database. What is a reasonable first conclusion?