Search
Varnish Enterprise

Module to control the built-in HTTP2 transport (h2)

Description

This VMOD contains functions to control the HTTP2 transport built into Varnish-Cache.

is

BOOL is()

Returns true when called on a session handled by the built-in HTTP2 transport.

Arguments: None

Type: Function

Returns: Bool

rapid_reset

DURATION rapid_reset([DURATION threshold])

Get and optionally set the h2_rapid_reset parameter (See varnishd(1)) for this HTTP2 session only.

Returns -1 when used outside the HTTP2 transport. Otherwise returns the previous value.

If the call leads to a change in the rate limit parameters, the current budget as retuned by h2.rapid_reset_budget() is reset.

Arguments:

  • threshold accepts type DURATION

Type: Function

Returns: Duration

rapid_reset_limit

INT rapid_reset_limit([INT number])

Get and optionally set the h2_rapid_reset_limit parameter (See varnishd(1)) for this HTTP2 session only.

Returns -1 when used outside the HTTP2 transport. Otherwise returns the previous value.

If the call leads to a change in the rate limit parameters, the current budget as retuned by h2.rapid_reset_budget() is reset.

Arguments:

  • number accepts type INT

Type: Function

Returns: Int

rapid_reset_period

DURATION rapid_reset_period([DURATION duration])

Get and optionally set the h2_rapid_reset_period parameter (See varnishd(1)) for this HTTP2 session only.

Returns -1 when used outside the HTTP2 transport. Otherwise returns the previous value.

If the call leads to a change in the rate limit parameters, the current budget as retuned by h2.rapid_reset_budget() is reset.

Arguments:

  • duration accepts type DURATION

Type: Function

Returns: Duration

rapid_reset_budget

REAL rapid_reset_budget()

Return how many RST frames classified as “rapid” the client is still allowed to send before the session is going to be closed.

SEE ALSO

Arguments: None

Type: Function

Returns: Real