Configure HTTP/2 Support
On This Page:
Objective
This document provides instructions on how to enable HTTP/2 support for your application. The HTTP/2 reduces latency and enhances efficiency for web-based applications.
Using the instructions provided in this guide, you can enable HTTP/2 connections for your services provisioned using F5® Distributed Cloud Services virtual host. For more information on virtual hosts, see Virtual Host.
Prerequisites
The following prerequisites apply:
- A valid Account is required.
Note: If you do not have an account, see Create an Account.
- A virtual host acting as a proxy for a service
Note: If you do not have a virtual host configured, see Create a Virtual Host.
Configuration
Configuration Sequence
You can enable HTTP/2 support in one of the following ways:
-
By configuring virtual host for your service with the virtual host of the type
TCP Proxy with SNI
. -
By enabling HTTP/2 support for the service in the cluster object configuration.
Enabling HTTP/2 support using the virtual host requires performing the following sequence of actions:
Phase | Description |
---|---|
Create Objects Required for Virtual Host | Create endpoint, cluster, route, and advertise policy. |
Create Virtual Host | Create virtual host of the TCP Proxy with SNI type. |
Enabling HTTP/2 support in the cluster object requires performing the following sequence of actions:
Phase | Description |
---|---|
Create Endpoint | Create endpoint where the service is available. |
Create Cluster | Create cluster for the endpoint with enabling HTTP/2. |
Create Objects Required for Virtual Host | Create route with the cluster as destination and advertise policy. |
Create Virtual Host | Create virtual host with the route and advertise policy. |
Enable HTTP/2 Support Using Virtual Host
HTTP2 Set can be viewed and managed in multiple services: Distributed Apps
, Web App & API Protection
, and Load Balancers.
This example shows HTTP2
setup in Load Balancers
.
Enabling HTTP/2 support using virtual host is achieved by creating the virtual host of type TCP Proxy with SNI
. Perform the following to create virtual host for your service with HTTP/2 support:
Step 1: Log into F5® Distributed Cloud Console with your tenant credentials. Create endpoint, cluster, route, and advertise policy.
- Open
F5® Distributed Cloud Console
homepage, selectLoad Balancers
box.
Note: Homepage is role based, and your homepage may look different due to your role customization. Select
All Services
drop-down menu to discover all options, or customize settings inAccount
(Administration
>Personal Management
>My Account
) >Account Settings
>Work domains and skill level
>Edit work domain & skills
button > select boxes (Advanced to add more options) >Save changes
button.
Note: Confirm
Namespace
feature, if available in service, is on correct namespace, drop-down selector located in upper-left corner.
- Select
Manage
in left column menu > selectVirtual Hosts
>Virtual Hosts
.
Note: If options are not showing available select
Advanced nav options visible
Show
link in bottom left corner. SelectHide
to minimize options from Advanced nav options mode if needed.
- Select
Add Virtual Host
button.
Step 2: Select Manage in the configuration menu and Virtual Hostsin the options pane. Select Add virtual host to load the virtual host creation form. Enter a name and set the Proxy Type as TCP Proxy with SNI.
-
Select
Manage
in left-menu >Virtual Hosts
>Virtual Hosts
in pop-up window > selectAdd Virtual host
button. -
Enter
Name
, enterLabels
andDescription
as needed. -
Select
Proxy Type
from drop-down menu options.UDP Proxy
orSecret Management Access Proxy
-
TCP Load Balancers > SNI check box.
-
Select
Cluster
>Add Cluster
>Origin Pool(cluster) Parameters
section >Show Advanced Fields
configure
link inTLS Parameters
section >SNI Selection
drop-down menu > enterSNI Value
inUpstream TLS Parameters
page.
Note: HTTP & TCP proxy types support through virtual host is removed, they are now supported only through Load Balancers menu.
Step 3: Add the route and advertise policy created in Step 1 to the Routes
and Advertise Policies
fields respectively. Select Add virtual host
to complete virtual host creation.
-
Select
Routes
fromList of Routes
or+ Select Route
inRoutes
section. -
Select
Advertise Policies
fromList of Advertise Policy
or+ Select Advertise Policy
inRoutes
section. -
Select
Save and Exit
button.
Note: For complete set of instructions on the virtual host configuration, see Create and Advertise a Virtual Host guide.
Enable HTTP/2 Support for the Cluster
Enabling HTTP/2 support for the cluster also requires you to configure endpoint first, and then add the cluster in the route configuration followed by creating advertise policy. Applying this route and advertise policy to the HTTP or HTTPS virtual host enables HTTP/2 support.
Perform the following steps to enable HTTP/2 support using cluster object.
Step 1: Log into F5® Distributed Cloud Console, create an endpoint for your cluster.
-
Log into
F5® Distributed Cloud Console
with your tenant credentials. -
Create an endpoint for your cluster as per the instructions listed in
Virtual Hosts
Create Endpoint chapter of the Create and Advertise a Virtual Host guide.
Step 2: Select Manage
in the configuration menu, and Clusters
in the options pane. Select Add cluster
to open the cluster configuration.
ENDPOINTS:
Load Balancers
>Manage
>Virtual Host
>Endpoints
>Add Endpoint
button >Name
< configureEndpoints
> selectSave and Exit
button.
CLUSTER:
-
Load Balancers
>Manage
>Virtual Host
>Clusters
>Add Cluster
>Endpoint Subsets
>Select Endpoint Subsets
button >Save and Exit
button. -
In
Load Balancers
> selectManage
>Virtual Host
>Clusters
. -
Select
Add Cluster
button. -
+ Select Endpoint Subsets
button. >Select Endpoint Subsets
button >Save and Exit
button.
Step 3: Configure Cluster fields.
Configure the cluster fields as per the instructions in the Create Cluster chapter of the Create and Advertise a Virtual Host guide.
Step 4: Select the Enabled
checkbox at the bottom of the cluster configuration form and select Add cluster
to complete creation of the cluster.
-
Toggle
Show Advanced Fields
inOrigin Pool(cluster) Parameters
section. -
Check
HTTP2 Enabled
box that appears at bottom of section underTLS Parameters
section.
Note: In case you already created the cluster, you can edit it using the
...
>Edit
option.
Step 5: Create route.
-
Manage
>Virtual Host
>Routes
>Add Route
button >Configure
link >+ Add Item
button >Destination List
drop-down menu inActions List
section >Configure
link >Add Item
>Cluster
drop-down menu. -
Select
Manage
>Virtual Host
>Routes
. -
Select
Add Route
button. -
Select
Configure
link >+ Add Item
button. -
Select
Destination List
drop-down menu inActions List
section >Configure
link >Add Item
>Cluster
drop-down menu.
Create route adding the cluster in the Destination List
for the Route action
field as per the instructions in the Create Route chapter of the Create and Advertise a Virtual Host guide.
Step 6: Create advertise policy and virtual host of type HTTP proxy or HTTPS proxy. Apply the route and advertise policy created in Step 5 and Step 6 to the virtual host configuration.
Note: For instructions, see Create Advertise Policy chapter and Create Virtual Host chapter of the Create and Advertise a Virtual Host guide respectively.