HTTP Basic Overview

Source: Internet
Author: User

HTTP protocol (Hypertext Transfer Protocol, Hypertext Transfer Protocol)

is the transport protocol used to transfer hypertext to the local browser from the WWW server. It can make the browser more efficient and reduce the network transmission. It not only ensures that the computer transmits hypertext documents correctly and quickly, but also determines which part of the document is being transmitted, and which content is displayed first (such as text before graphics), and so on.

HTTP is an application-layer communication protocol between a client browser or other program and a Web server, where hypertext information is stored on a Web server on the Internet, and the client needs to transmit hypertext information requested for access over the HTTP protocol.

The client enters the URL to be visited in the browser, and the URL is referred to as a URL that describes the location of a particular resource on a server. Format:

Protocol://Host name or address in host name [:p ORT]

Port ports:

HTTP default port is 80 port, the default port can be omitted, if the server side changes the listening port, you need to manually specify the port on the client.

The process of HTTP request processing:

1. Create or process Links: Receive requests or reject requests.

2. Accept the request

The way that requests are received is typically the concurrency response model:

Single-process I/O model: serial response;

Multi-process I/O model: Initiates multiple processes at the same time, each responding to a request;

multiplexed I/O Model: A process responds to multiple requests;

Multithreaded model: One process generates multiple threads, and each thread responds to a request;

Event-driven: a process responds to multiple requests directly;

Multiplexed multi-process I/O structure: starts m processes, each process has n threads, and each thread responds to a request;

3. Processing requests

Long links

Short connection

4. Building response Messages

5. Sending response messages

6. Logging Information

Characteristics of httpd

Modular

Supports dynamic loading and unloading (DSO)

Three classic modules in a multi-path processing module (MPM)

prefork: A master process, multiple sub-processes; Working mode: A process responds to a request;

Master process: Manage child processes, create sockets, receive user requests, and send to a subprocess to process;

Child processes: processing requests, responding to requests;

worker: Multi-process multithreaded model; A thread responds to a request;

Master process: Manage child processes, create sockets, receive user requests, and send to a subprocess to process;

Child Process: responsible for managing threads;

Threads: processing and responding to requests;

Event: Events-driven model, multi-process model, each process responds to multiple requests;

Master process: Manage child processes, create sockets, receive user requests, and send to a subprocess to process;

child process: processing and responding to requests;

Httpd-2.2:event for the test model;

Used in CentOS 6: MPM does not support the DSO mechanism;

Httpd-2.4:production ready;

Used in CentOS 7: Supports DSO mechanism;

Version of HTTPD

httpd-1.3: The official has ceased to maintain;
httpd-2.0
httpd-2.2
httpd-2.4
If you want to know the detailed version information, the official website is: httpd.apache.org
HTTPD Features

CGI: Public Gateway Interface

Virtual Host: Ip,port,hostname

Reverse Proxy

Load balancing: Bytraffic,bybussiness,byrequest

Path aliases

A rich user authentication mechanism

Basic

Digest

Support for third-party modules, etc.




This article is from the "Onion" blog, please make sure to keep this source http://guanbo.blog.51cto.com/896623/1825892

HTTP Basic Overview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.