TsgcWebSocketLoadBalancerServerProperties › HTTP2Options

HTTP2Options Property

Enables and tunes HTTP/2 on the load balancer's TLS listener used to serve HTTPS requests from downstream clients.

Syntax

property HTTP2Options: TsgcWSHTTP2Server_Options read FHTTP2Options write SetHTTP2Options;

Default Value

Enabled=False

Remarks

By default the load balancer serves HTTP requests using HTTP/1.1. Set HTTP2Options.Enabled to True to advertise HTTP/2 over ALPN; clients that do not support HTTP/2 fall back to HTTP/1.1 automatically. The Settings sub-object exposes the tunables defined in RFC 7540: EnablePush (server push, enabled by default), HeaderTableSize (HPACK table, initial 4096 octets), InitialWindowSize (per-stream flow-control window, initial 65,535 octets), MaxConcurrentStreams, MaxFrameSize (initial 16,384 octets) and MaxHeaderListSize. HTTP/2 requires TLS — make sure SSL is enabled. This setting controls only the downstream client hop; the hop to backend servers is independent.

Example


oServer := TsgcWebSocketLoadBalancerServer.Create(nil);
oServer.SSL := true;
oServer.HTTP2Options.Enabled := true;
oServer.HTTP2Options.Settings.EnablePush := true;
oServer.Active := true;

Back to Properties