Client-Server-Model Flashcards

1
Q

What is a server?

A

A server is a computer program /hardware/ that provides functionality for other programs or devices, called “clients”. This architecture is called the client–server model.

Servers can provide various functionalities, often called “services”, such as sharing data or resources among multiple clients, or performing computation for a client.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a client?

A

Client is a piece of computer software that accesses a service made available by a server as part of the client–server model of computer networks.
The server is often (but not always) on another computer system, in which case the client accesses the service by way of a network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

HTTP Messages

A

HTTP messages are how data is exchanged between a server and a client. There are two types of messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What three things are on the start-line of an HTTP request message?

A
  1. An HTTP method, a verb (like GET, PUT or POST) or a noun (like HEAD or OPTIONS), that describes the action to be performed.
  2. The request target, usually a URL, or the absolute path of the protocol, port, and domain are usually characterized by the request context. The format of this request target varies between different HTTP methods.
  3. The HTTP version, which defines the structure of the remaining message, acting as an indicator of the expected version to use for the response.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What three things are on the start-line of an HTTP response message?

A
  1. The protocol version, usually HTTP/1.1.
    2/ A status code, indicating success or failure of the request. Common status codes are 200, 404, or 302
  2. A status text. A brief, purely informational, textual description of the status code to help a human understand the HTTP message.
    A typical status line looks like: HTTP/1.1 404 Not Found.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are HTTP headers?

A

An HTTP header is a field of an HTTP request or response that passes additional context and metadata about the request or response.

For example, a request message can use headers to indicate it’s preferred media formats, while a response can use header to indicate the media format of the returned body.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is on the first line of an HTTP response message?

A

The status line is the first line in the response message. It consists of three items: The HTTP version number, showing the HTTP specification to which the server has tried to make the message comply. A status code, which is a three-digit number indicating the result of the request.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Is a body required for a valid HTTP message?

A

No, body is optional, it is containing data associated with the request (like content of an HTML form), or the document associated with a response. The presence of the body and its size is specified by the start-line and HTTP headers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly