Graphic http--Reading notes

Source: Internet
Author: User

HTTP is often translated as Hypertext Transfer Protocol, but this translation is not rigorous. The strict translation should be "Hypertext Transfer Agreement".

Network Fundamentals Tcp / ip:

There are various types of content in the agreement:

from the cable specifications to The choice of IP address, the method of searching for an offsite user, the order in which the Parties establish communication, and the Web page display need

The steps to be processed, and so on.

responsible for the transmission of IP Protocol:

by the level of the The IP (Internet Protocol) Internet Protocol is located at the network layer.

Maybe someone will confuse "IP" and "IP Address", "IP" is actually the name of a protocol.

The purpose of the IP protocol is to send various packets to each other. and to ensure that they do transfer to each other , you need to meet all kinds of conditions. The two important conditions are IP address and MAC address (Media Access Control).

The IP address indicates the address to which the node is assigned, and the MAC address refers to the fixed address to which the network card belongs . The IP address can be paired with the MAC address. The IP address can be transformed, but the MAC address is basically unchanged.

Use The ARP protocol communicates with the MAC address. Communication between IP is dependent on the MAC address.

ARP is a protocol to resolve the address, according to the IP address of the communication party can be used to detect the corresponding MAC address.

ensure the reliability of TCP Protocol:

by the level of the TCP is located in the transport layer and provides a reliable byte stream service.

Word, the TCP protocol splits data in order to make it easier to transfer big data (message segments), and the TCP protocol verifies that the data is ultimately delivered to the other party (three-time handshake strategy).

responsible for the domain name resolution DNS Service:

The DNS (Domain Name System) service is the same as the HTTP protocol at the application layer

agreement. It provides the parsing service between the domain name and the IP address. computers can be given both The IP address can also be given the hostname and domain name.

The DNS protocol provides services for locating IP addresses through a domain name, or reversing the domain name from an IP address.

The IP protocol, the TCP protocol, and the DNS service are in use

What are the functions of the HTTP protocol in the communication process:

Use State management of Cookies:

HTTP is a stateless protocol that does not manage the state of requests and responses that have occurred before. In other words, this request cannot be processed according to the previous state.

Encoding increases transfer rate:

HTTP can transmit data in a direct way, but it can also increase the transmission rate by encoding during transmission. By encoding during transmission, it is possible to efficiently handle a large number of

Requests for access. However, the encoded operation requires the computer to complete, thus consuming more resources such as CPU.

chunked transfer encoding for split send:

in the HTTP communication process, the requested encoding entity resource has not been fully transferred until the browser cannot display the request page. When transferring large volumes of data, by splitting the data into chunks, the browser is able to display the page progressively.

The function of the block of the entity body is called the Chunked Transmission code ( Chunked transfercoding).

chunked transfer encoding divides the entity body into multiple parts (blocks). Each piece will be used 16

To mark the size of the block, and the last piece of the entity body will be labeled with "0 (CR+LF)"

Remember.

Entity principals that use chunked transfer encoding are decoded by the receiving client and restored to the

The entity body before the code.

There is a mechanism called transfer encoding (Transfer Coding) in http/1.1, which can

To be transmitted in a coded manner at the time of communication, but only defined in the chunked transfer encoding.

Get the scope request for partial content:

If the server side cannot respond to a range request, a status code of OK and full entity content is returned.

Content negotiation returns the most appropriate content:

Agents are available in a variety of ways, categorized by two benchmarks. One is whether the cache is used and the other

The type is whether the message will be modified.

Using a gateway can improve the security of the communication because it can communicate between the client and the gateway

Encryption on the line to ensure the security of the connection. For example, a gateway can connect to a database and use

The SQL statement queries the data. Also, when you make a credit card settlement on a web shopping site,

The gateway can be linked to the credit card clearing system.

table 6-2: request header Fields

non- http/1.1 header field:

the header field used in the HTTP protocol communication interaction is not limited to the 47 header fields that are defined in the RFC2616. There are also cookies, Set-cookie and content-disposition

wait in the other The header fields are defined in the RFC, and they are used very often.

These unofficial header fields are summarized in RFC4229 HTTP Header fieldregistrations.

There is no encryption mechanism in the HTTP protocol, so it is easy to be bugged and tampered with.

http+ Encryption + authentication + integrity Protection =https

HTTPS also has some problems, that is, when using SSL, its processing speed

will become slower.

Confirm Authentication of Access user identity:

based on Feature append protocol for HTTP:

Neither 1.Ajax nor comet communication resolves the problem with the HTTP protocol itself

2.SPDY

SPDY eliminate the Web bottleneck?

because SPDY is basically just a single domain name (IP address) of the communication multiplexing, so that when a Web site using multiple domain names under the resources, improve the effect will be limited

System.

SPDY is really a technology that can effectively eliminate HTTP bottlenecks, but many web sites are not just caused by http bottlenecks. The speed of the WEB itself

from other areas of study, such as improving How Web content is written, and so on.

3. Using WebSocket

WebSocket, which is the standard for full-duplex communication between a Web browser and a Web server.

among them, The WebSocket protocol is set by the IETF as standard, and the WebSocket API is set by the

Standard. WebSocket technologies that are still under development are primarily designed to address Ajax and Comet

problems caused by the defects attached to the XMLHttpRequest.

once A communication connection between the WEB server and the client that establishes the WebSocket protocol,

All communications are then dependent on this proprietary protocol. Communication process can be sent to each other

Data in any format, such as JSON, XML, HTML, or pictures.

because it is built on HTTP-based protocol, so the initiator of the connection is still the client,

and once established WebSocket communication connection, regardless of server or client, either party

can send messages directly to each other.

Main Features:

Push function, reduce traffic

in order to achieve WebSocket communication, after the HTTP connection is established, you need to complete a

(handshaking) Step of the second "handshake".

in order to achieve WebSocket communication, need to use the HTTP Upgrade header Word

To inform the server that the communication protocol has changed to achieve the purpose of the handshake.

HTTP/2.0 's 7 Technologies and discussions:

Graphic http--Reading notes

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.