I. Introduction to HTTP
HTTP (Hypertext Transfer Protocol) Protocol is the application layer protocol based on TCP Transport protocol, and its development is the result of collaboration between WWW Association and Internet Working Group and IETF. HTTP is an object-oriented protocol belonging to the application layer, which is suitable for distributed hypermedia information System because of its convenient and fast way.
The main features of the HTTP protocol are as follows:
- Supports Client/server mode.
- Simple----When a client requests a service from a server, it simply specifies the URL of the service, carrying the necessary request parameters or the body of the message;
- Flexible----HTTP allows the transfer of any type of data object, and the transport content type is content-type specified in the HTTP message header.
- Stateless----HTTP protocol is a stateless protocol, stateless means that the protocol has no memory function for session state, the lack of state means that if the subsequent processing needs the previous information, then it must be re-transmitted. This causes the amount of data to be transferred each time the connection is increased on the other hand, when the server does not need the previous information, It responds faster and has less load.
Netty 's HTTP protocol stack was developed based on the Netty Nio communication Framework. Therefore, the HTTP protocol for Netty is asynchronous and non-blocking.
Netty HTTP Server Start-up development