By Admin on Wednesday, 30 September 2020
Category: All

HTTP/2 Initial Server Support

​From sgcWebSockets 4.4.3 HTTP/2 protocol is initially supported (it's still on beta) from TsgcWebSocketHTTPServer. Fast HTTP.SYS based server will receive support for HTTP/2 on next versions.

By default, HTTP/2 support is disabled, so you must enable before testing. There is a new property, called HTTP2Options, just set HTTP2Options.Enabled = true to allow HTTP/2 protocol.

Performance Comparison

Let's do a very simple performance comparison between HTTP 1.1 and HTTP/2 protocols. We will use our ServerChat demo sample and will access to main page. Using Chrome developer tools we will compare how much time takes one protocol against other

HTTP 1.1 

THe main document takes 36 ms and finishes in 413 ms. 

HTTP/2 Protocol 

The main document takes 4 ms and finishes in 257 ms. 

And the winner is...

HTTP/2!!!

Of course, this is a very basic and non conclusive test, but you can see that using a single connection to download 8 documents (HTTP/2) is much faster than use several connections (HTTP 1.1).

Related Posts