HTTP/2
HTTP/2 is an evolution of the HTTP 1.1 protocol, it basically tries to
be more efficient when using networks. The semantics are the same, so it's
designed to be compatible with old protocols.
HTTP 1.1 Limitations
HTTP 1.1 is limited to processing one request per connection, so usually
clients use more than one connection to request files from servers. But
this raises a problem, because when there are too many open TCP connections,
there is a race between clients to use the server resources and performance
is lower and lower as more clients connect to servers.
Main features
- HTTP/2 is a binary protocol (remember
that HTTP 1.1 is a text protocol).
- HTTP/2 works over TLS and ALPN.
- It's multiplexed (allows you to send more
than one request over a single TCP Connection).
- Server can push responses to clients.
- Reduces Round Trip Times, so clients can
load faster.
HTTP/2 introduces other improvements, more details: RFC7540.
HTTP/2 requires our custom Indy version because
it requires ALPN protocol.
Components
- TsgcHTTP2Client: client component that fully supports HTTP/2
protocol (sgcWebSockets 100% Pascal code, without external libraries).
- TsgcWebSocketHTTPServer:
server component that fully supports HTTP/2 protocol (sgcWebSockets
100% Pascal code, without external libraries). By default HTTP/2 is
disabled, you can enable using HTTPOptions property and set Enable
= true.
- TsgcWebSocketServer_HTTPAPI:
server component that supports HTTP/2 protocol (Microsoft implementation
and Requires Windows 2016+ or Windows 10+).
- DataSnap
Servers: datasnap server can support HTTP/2 protocol too.
APIs