Computer network application layer
2020-11-08 21:03:00
【Virtuous fish】
application layer
- Multi terminal system communication is actually process communication , Exchange messages over the network ( Application layer protocol generation )
- Processes send and receive messages to the network through sockets ( Corresponds to one or more )
- Socket is an interface between application layer and transport layer , In order to establish the programmable interface of network program
- Application developers can control everything in the application layer , There is little control over the transport layer ( You can set the protocol , Maximum length )
- To communicate between processes, you need to know the host address of the parent (IP The network layer ) And the destination host accepts the process identifier ( Port transport layer )
- The services that the transport layer should provide to the application : Reliable data transmission 、 Security 、 throughput 、 timing ( The latter two tu They don't offer )
- Reliable data transmission : When the sending process transfers data to the socket, it is considered to be satisfied .
- throughput : Guarantee the bit rate delivered to the receiver .
- Security : encryption
- TCP: Congestion control ( Inhibit the sender process )
- UDP: No congestion control . The sender can inject data into the next layer at any rate . But the throughput of the receiver is generally not up to
- Throughput or timed transport layer protocols do not provide
- The application layer protocol defines how programs running on different ends deliver messages
- How to transfer : Message type 、 grammar 、 semantics , When and how to send messages , How to respond to
- HTTP Use TCP, Don't worry about data loss . Don't store any state about the user ( Stateless protocol )
- HTTP Provide continuous links ( Default ) And non persistent connections
- HTML Basic documents .html Contains references to other objects ( Such as images ) You need to use the reference given to continue to ask for data
- HTTP It's stateless , but web Sites often want to associate content with user identity ,cookie
- cookie Allow sites to track users
- cookie: Send a request ->web Generate a unique identifier and use it as an index to create a table entry in the back end
- web Respond to the request with a setCookie The first one contains the identification code
- If you visit this website again, you will ask for the header to add Cookie
- web A proxy server is also called a cache , Store recently requested copies of objects
- The user requests the cache first , The cache returns information when it is available . Didn't send a request to come back and respond to it
- web Buffers usually have ISP Buy , For example, the school makes students point to it .
- web Caching can be done with if-modified-since The first to prove that your object is up to date ( When to call ?)
版权声明
本文为[Virtuous fish]所创,转载请带上原文链接,感谢