Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

HTTP/2 Connection and Stream Session Logging

Learn about the HTTP/2 session logging.

Overview

In HTTP/2, a single TCP connection session multiplexes multiple HTTP stream sessions. Each stream is established, processed, and closed independently within the same connection.

This feature improves HTTP/2 logging by separating stream session logs from connection session logs while preserving existing connection session behavior. The system generates dedicated log types for stream sessions, enabling visibility at the stream level without affecting connection session logging.

Traffic accounting aligns with HTTP/2 semantics. Stream sessions use frame-based metrics instead of packet-based metrics, and HTTP/2 frame sizes for byte accounting. This approach ensures accurate session counts and consistent traffic reporting.

Connection and stream sessions are linked using explicit identifiers such as connection session ID and stream session IDs, simplifying correlation and analysis. Connection sessions continue to use existing session log types, ensuring compatibility with current log parsers.

Configuration

By default, HTTP/2 connection sessions do not generate session logs. You can configure the following configuration statements to enable session initialization and closure logs for HTTP/2 connection sessions:

Benefits of HTTP/2 Connection and Stream Session Logging

  • Accurate accounting — Prevents double counting by separating connection and stream session logs.

  • Consistent metrics — Uses frame-based counters aligned with HTTP/2 behavior.
  • Improved troubleshooting — Provides visibility into individual streams.
  • Flexible logging — Allows independent control of connection and stream session logging.

Logging Enhancements

  • Separate stream log types — HTTP stream sessions generate dedicated RT_FLOW_STREAM_* logs, preventing overlap with connection-level logs.

  • Frame-based metrics — Stream session logs uses frames-from-client and frames-from-server counters.

  • Accurate byte accounting — Reports HTTP/2 frame size in byte counters (bytes-from-client and bytes-from-server).

  • Field clarity — Connection sessions use nested-application="N/A"; stream sessions include application and stream identifiers.

Difference Between Connection and Stream Sessions

Attribute HTTP Connection Session HTTP Stream Session
Log type RT_FLOW_SESSION_* RT_FLOW_STREAM_*
Representation TCP/TLS connection HTTP/2 stream
Application HTTP2 HTTP or specific application
Identification field Not present parent-session-id
Stream identifiers Not applicable client-side-stream-id, server-side-stream-id
nested-application N/A Application name
Metrics Packets and bytes Frames and bytes

Example HTTP/2 Session Logs

The following examples show representative RT_FLOW logs for HTTP/2 connection and stream sessions, including create, close, and deny events:

HTTP Stream Session Logs

HTTP Connection Session Logs