Host: Computers connected to a network are often called ‘hosts’, regardless if they’re hosting a service or not.
- A single host can have many services running.
- Client and server can be on the same computer/host (e.g. when you’re building a small application). However, most often, they are on different hosts.
Server: a computer or computer program that manages access to a centralized resource or service in a network. The server can refer to the host computer itself or the service running on the host computer. Servers are often classified by the services they provide (e.g. web server).
- Servers provide services to many clients.
- Servers communicate with other servers to handle aspects of those client requests they don’t provide. This is referred to as inter-server or server-to-server communication.
- A server has one IP address and multiple ports.
Client: can refer to a software or a device that accesses a service made available by a server. If the server is on another host, the client accesses it via a network.
HTTP transaction: When a client or browser makes a single request for HTTP content, the followings happen:
- DNS Lookup: Client sends DNS query to local ISP DNS server and DNS sever responds with the IP address for the requested website (eg. google.com).
- Client establishes TCP connection with google.com’s IP address.
- Client sends HTTP request to google’s web server.
- HTTP requests are made via REST methods: GET, POST, PUT, DELETE, OPTIONS, HEAD.
- Server processes the request, finds the resource, and sends the response to client.
- Client formats the response and displays it on the browser.
- Client closes or reuses the connection for further request.
HTTP Header: contains additional info about the client browser, the requested page, and the server, etc.
HTTP Body: contains either the resource sent (in a POST request) or the resource fetched (in a POST response).
Routing: parses the url received by a server to identify and trigger target behavior requested by user via that url.
Workers: background jobs that run behind the scenes.
- daemon: OS processes that handle background jobs. They’re basically servers for OS requests.
- Cron: a daemon that schedules OS jobs or workers.