← All topics

Client-Server Architecture

Clients, servers, HTTP/HTTPS, headers, request bodies, and databases.

Question 1 of 10Correct: 0Incorrect: 0

Questions and explanations

Find an explanation for each question here. To test yourself, take the quiz above first.

  1. What is a client in a client-server architecture?

    A client is the side the user interacts with, such as a browser, mobile app, or desktop application. It sends requests to the server and presents the received result to the user.

  2. What is a server and what does it do?

    A server accepts requests from clients, runs the required logic, accesses a database when needed, and returns a response. For example, a server can verify a user's login and password.

  3. Why does an application need a database?

    A database keeps information between application sessions and helps find, update, and relate data efficiently. The server usually accesses it on the client's behalf.

  4. What is an HTTP request?

    An HTTP request is a client's call to a server. For example, a browser sends one when a user opens a page, signs in, or submits a form.

  5. What is an HTTP response?

    After processing a request, the server returns an HTTP response. It can include data, information about success or an error, and additional service details.

  6. What are the main parts of an HTTP request?

    The method specifies the action, the URL identifies the resource, and headers carry service information. A request body is added when data must be sent, for example form data.

  7. What are HTTP headers and what are they used for?

    Headers provide the server with important request context. For example, Content-Type identifies the data format, while Authorization can send credentials that confirm a user's permissions.

  8. What is a request body and when is it used?

    A request body is used to send data to the server, for example a username and password during sign-in or details of a new order. Requests that send no data may have no body.

  9. What is the main difference between HTTP and HTTPS?

    HTTPS uses TLS encryption to protect data while it travels between a browser and a server. This is especially important for passwords, payment details, and other personal information.

  10. What can act as a client in a client-server architecture?

    A client is any application or device that sends a request to a server, such as a browser, mobile application, or desktop program.