Configure HTTP/2 Support

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 Volterra virtual host. For more information on virtual hosts, see Volterra Virtual Host.


Prerequisites

The following prerequisites apply:


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

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 in to the Volterra console with your tenant credentials and change to your namespace. Create endpoint, cluster, route, and advertise policy.

Step 2: Select Manage in the configuration menu and Virtual Hosts in the options pane. Click Add virtual host to load the virtual host creation form. Enter a name and set the Proxy Type as TCP Proxy with SNI.

Step 3: Add the route and advertise policy created in Step 1 to the Routes and Advertise Policies fields respectively. Click Add virtual host to complete virtual host creation.

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 in to the Volterra console with your tenant credentials and change to your namespace. Create an endpoint for your cluster as per the instructions listed in the 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. Click Add cluster to open the cluster configuration form.

Step 3: 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 click Add cluster to complete creation of the cluster.

EnHttp2
Figure: Enable HTTP/2 for Cluster

Note: In case you already created the cluster, you can edit it using the ... -> Edit option.

Step 5: 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.


Concepts


API References