Skip to content

[Task] docs: Document HTTP/2 advanced features (HPACK, server streams) #686

Description

@kcenon

Summary

Document the HTTP/2 advanced features including HPACK header compression, server-side streaming, and the HTTP/2 library internals.

Parent Issue

Part of: [EPIC] docs: Address documentation gaps across all ecosystem systems (kcenon/common_system#325)

Background (Why)

network_system's HTTP/2 implementation at libs/network-http2/ includes advanced features beyond basic request/response that are undocumented:

  • HPACK header compression (RFC 7541)
  • Server-side streaming
  • HTTP/2 frame handling internals

These are key differentiators vs HTTP/1.1 that users need documentation for.

Source files:

  • libs/network-http2/include/network_http2/internal/hpack.h — HPACK header compression
  • libs/network-http2/include/network_http2/http2_server_stream.h — Server-side streaming
  • libs/network-http2/include/network_http2/http2_client.h — HTTP/2 client
  • libs/network-http2/include/network_http2/http2_server.h — HTTP/2 server
  • libs/network-http2/include/network_http2/http2_request.h — Request types
  • libs/network-http2/include/network_http2/http2.h — Common HTTP/2 types

Scope (What)

1. HTTP/2 Architecture Overview

  • Frame-based protocol internals
  • Stream multiplexing model
  • Flow control implementation
  • HPACK compression integration

2. HPACK Header Compression (hpack.h)

  • Static table (RFC 7541 Appendix A)
  • Dynamic table management
  • Encoding/decoding API
  • Compression ratio characteristics
  • Custom header optimization

3. Server-Side Streaming (http2_server_stream.h)

  • Server push and streaming API
  • Stream lifecycle management
  • Flow control and backpressure
  • Multiple concurrent streams

4. HTTP/2 Client (http2_client.h)

  • Connection setup with ALPN negotiation
  • Multiplexed request sending
  • Response stream handling
  • Connection pooling

5. HTTP/2 Server (http2_server.h)

  • Server setup and configuration
  • Request routing
  • Stream handling
  • Server push initiation

6. Performance Characteristics

  • Header compression savings (typical 60-90% reduction)
  • Multiplexing throughput vs HTTP/1.1 pipelining
  • Stream concurrency limits and tuning

7. Usage Examples

  • Basic HTTP/2 server with routing
  • Client with multiplexed requests
  • Server-sent events via streaming
  • Bidirectional streaming

Acceptance Criteria

  • HTTP/2 architecture documented
  • HPACK compression API documented
  • Server streaming API documented
  • Client and server setup documented
  • Performance comparison with HTTP/1.1
  • At least 4 code examples

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationpriority:mediumMedium priority issue

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions