HTTP/1.1, HTTP/2, and HTTP/3
Back to Learn
FAACChapter 5

Corporate API Fundamentals and Architecture

HTTP/1.1, HTTP/2, and HTTP/3

Semantics, messages, connections, multiplexing, and QUIC in API architectures

In-depth edition — professional study and reference material

Evolution from HTTP messages to multiplexed streams and QUIC through an API Gateway

Chapter overview

is often presented through short GET and POST examples, but this view is insufficient for those operating enterprise gateways. In production, is a protocol with its own semantics, strict delimitation rules, negotiation mechanisms, cache, conditions, intermediaries and different transport mappings. A call that appears to be a single request can be received in at the edge, converted to /2 up to the gateway, and forwarded in /1.1 to the backend. Each hop has its own connection, state, timeout, field compression and operational risk.

The /1.1, /2, and versions do not represent three different APIs. They share methods, status codes, fields, and concepts defined by semantics, but they encode and transport these elements in different ways. /1.1 uses a textual syntax over a TCP ; /2 introduces binary frames and multiplexed streams over a connection; takes semantics to , which works over UDP and integrates TLS 1.3 into the transport.

For an API Gateway engineer, the distinction between semantics and wire versioning is central. A 405 error is not a consequence of TCP or ; it indicates that the method is not allowed by the resource. An no response timeout points to another layer. A 502 may have been generated by the gateway after a failed connection to the upstream. Intermittent behavior in /2 may involve limits, flow window, drainage or an inappropriate translation to /1.1 in the next hop.

This chapter builds a complete mental model: first establishes the common semantics, then delves into the format and connections of /1.1, then explains the frame and architecture of /2, and finally introduces and . The goal is not to memorize lists, but to understand which properties remain stable, which change between versions and what evidence should be collected at each point in an enterprise architecture.

Central principle

semantics pertain to the operation; the version and connection belong to each hop. A proxy finishes a message, applies rules, and creates a new message for the next destination.

Learning objectives

  • Explain the semantic architecture of and separate meaning, , and transport mapping.
  • Interpret method, request target, , fields, , trailers and status codes.
  • Distinguish security, idempotency and cacheability of the main methods.
  • Design caching and revalidation using Cache-Control, Age, , Last-Modified and conditional requests.
  • Interpret /1.1 syntax, including CRLF, -Length, Transfer-Encoding, and contentless messages.
  • Understand persistent connections, pipelining, keep-alive, timeouts and .
  • Recognize risks of divergent parsing, , response splitting and hop-by-hop fields.
  • Explain frames, streams, , , and in /2.
  • Understand , h2, h2c, and concurrency limits.
  • Explain , TLS 1.3 integration, Connection IDs, migration, loss, and independent streams.
  • Understand frames, control streams, , , and HTTPS/SVCB discovery.
  • Compare /1.1, /2, and on latency, observability, security, and operation.
  • Apply the concepts to Axway API Gateway, Azure API Management and architectures with multiple proxies.
  • Diagnose failures through traces, headers, logs, connection metrics and traffic captures.

Chapter structure

Table 1 - Conceptual organization of the chapter.
BlockContentGuiding question
AHTTP SemanticsWhat does the message mean regardless of version?
BHTTP/1.1How are textual messages delimited within a TCP stream?
CHTTP/2How do frames and streams efficiently share a connection?
DHTTP/3 and QUICHow to reduce blockages and make connection, security and mobility part of transportation?
AndGateways and operationHow do different versions coexist and how to locate flaws in each jump?

: application protocol and semantic architecture

RFC 9110 defines as a stateless application protocol for distributed systems and establishes concepts common to all versions. “Stateless” does not mean that applications cannot maintain session or business state. It means that the protocol does not require the server to preserve, between independent requests, the context necessary to interpret the next message. State can be represented in resources, databases, cookies, tokens, caches or sessions, but each request must carry enough information to be processed according to the contract.

The main semantic unit is a request or response message. A request expresses a method applied to a target, accompanied by fields and, optionally, . A response communicates the result through a status code, fields, and possible . does not determine that the is JSON nor that the API is REST. The protocol can transport HTML, images, XML, Protobuf, files, events and other formats registered or agreed between the parties.

Semantics also defines properties that guide intermediaries. Caches need to know when a response can be reused; proxies need to differentiate fields destined for the next hop from end-to-end metadata; customers need to decide when an operation can be repeated after failure; gateways need to preserve , method and without creating ambiguity. These properties are more important for interoperability than the textual appearance seen in an /1.1 example.

Common HTTP semantics mapped differently by HTTP/1.1, HTTP/2, and HTTP/3
Figure 1 - The semantics are shared; each version defines a different mapping for the network.

Reading for gateways

When a gateway receives /2 and calls a backend on /1.1, it does not “forward frames”. It decodes a message, executes policies, and generates another message compatible with the next protocol.

Evolution: from minimal messages to multiplexed transport

/0.9 had an extremely simple form: a GET request followed by the path, and a response composed by the document. There were no status codes, fields, type negotiation, or persistent connection. This simplicity suited early Web documents, but did not offer suitable mechanisms for complex distributed applications. /1.0 introduced initial line versions, status codes, fields, and media types, allowing you to represent metadata and different .

/1.1 consolidated persistent connections by default, the Host field, more complete caching, conditional requests, chunked transfers and rules. The protocol now supports multiple sites on the same IP address and reduces the cost of opening a connection per object. Still, the reliance on an ordered TCP and sequential format has created limits for pages and APIs with many concurrent operations.

/2 preserved the semantics and replaced the textual message format with binary frames associated with streams. This allowed us to interleave multiple exchanges on the same connection and compress repetitive fields with . maintained the streams and frames model, but replaced TCP with . Thus, loss in one does not need to prevent the delivery of data available from other streams, and the cryptographic handshake becomes part of the transport establishment.

Timeline of evolution from HTTP/0.9 to HTTP/3
Figure 2 - Historical evolution of the protocol.

Semantic compatibility

A GET method is still GET in /1.1, /2, and . What changes is how method, target, fields and are represented and transported.

Transaction model: request, response and self-describing messages

An transaction begins when a client sends a request to an or intermediary server. The request contains control information and metadata that allows you to determine the resource, operation and expected form of response. The server produces one or more informational responses and a final response. In /1.1, elements appear as lines and fields; in /2 and , they are converted into pseudo-fields and frames.

The of a message is conceptually different from its on the wire. Fields such as -Type and -Encoding describe the . tells you how to locate within the connection. In /1.1, -Length or chunked can delimit the body; In /2 and , is loaded in DATA frames and the end of the indicates completion. Confusing metadata with produces interoperability bugs and vulnerabilities.

Trailers are fields sent after the . They can carry calculated metadata at the end of the transmission, such as integrity or status of protocols built on . Not all intermediaries preserve trailers, and the contract needs to consider this possibility. On gateways, turning streaming into full buffering can change latency, memory consumed, and the ability to deliver trailers to the client.

Conceptual anatomy of an HTTP request and response
Figure 3 - Conceptual anatomy of request and response.
POST /v1/payments HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: application/json
Content-Length: 42
{"amount":100.00,"currency":"BRL"}

Identifiers, URI, and target of the request

A URI identifies a resource or reference used in the interaction. In common API usage, the URI includes scheme, , path, and query. At `https://api.example.com:443/v1/accounts/123? view=summary`, the scheme is HTTPS, the contains host and port, the path identifies a logical hierarchy and the query adds parameters. The fragment, when present in a URI, is processed by the client and is not sent in the request.

/1.1 uses different forms of request-target depending on the method and type of intermediary. The -form sends path and query; absolute-form is typical in forward proxies; -form is used by CONNECT; and the asterisk-form appears in OPTIONS `*`. The Host field is mandatory in /1.1 and informs the intended . In /2 and , pseudo-fields such as `:scheme`, `: `, `:path` and `:method` represent these components.

Gateways must treat carefully because it participates in routing, certificate selection, policies, and protection against Host header attacks. A proxy can receive a public address and call a different internal host; This does not authorize indiscriminately substituting the meaning of the original . On some architectures, the backend needs to know the external host via `Forwarded` or equivalent fields, but these fields should only be trusted when entered by controlled intermediaries.

Table 2 - Common components of an HTTP URI.
ComponentExampleTechnical use
schemehttpsDefines security schema and expectations.
Authorityapi.example.com:443Identifies host and logical port of the source.
Path/v1/accounts/123Selects resource or route.
Queryview=summaryNon-hierarchical parameters.
Fragment#sectionIt is not sent to the server.

Methods: intent, safety, and idempotency

The method expresses the intent of the request. GET requests the transfer of a ; HEAD requests the same metadata without response ; POST asks the resource to process the according to its semantics; PUT replaces or creates state in the target URI; DELETE requests the removal of the current association; OPTIONS describes communication options; CONNECT establishes a tunnel; TRACE runs a loopback diagnostic and is typically disabled in corporate environments.

A secure method is defined as essentially read-only: the client does not request a change to the server's state. This doesn't prevent logs, metrics, or operational billing, but it does mean that the intended effect is not a business change. means that repeating the same intention multiple times should produce the same desired effect as a single execution. PUT and DELETE are semantically idempotent, although observable responses and side effects may .

The distinction is decisive for retries. A gateway can repeat a GET request after connection failure with less semantic risk. Retrying payment POST may duplicate the operation if the backend processed the before the response was lost. Financial APIs often introduce an application key, persisting the result associated with a unique key. This strategy complements, but does not change, the semantics of the method.

Security and idempotence comparison of main HTTP methods
Figure 4 - Semantic properties of the main methods.

Retry is not just a technical decision

Before configuring retries on the gateway, classify the operation, determine the point at which the upstream may have taken effect, and define how duplicates will be detected.

Status codes and response authorship

The status code describes the result of the attempt to interpret and satisfy the request. 1xx responses are informative; 2xx indicate success; 3xx advise redirection or use of another ; 4xx indicate that the request cannot be met under the conditions presented; 5xx report server or intermediary failure. The class is relevant, but the specific code and associated fields provide the complete semantics.

In architectures with proxies, the final code can be created by any intermediary. A 401 can come from a gateway authentication policy without the backend being called. A 429 can represent the edge's rate limit. A 502 typically indicates that a gateway did not get a valid response from upstream; a 504 represents timeout acting as a gateway. Logs must record authorship, policy stage, and upstream status separately.

/1.1 reason phrases are informational and should not control logic. /2 and carry the code in `:status` and do not carry reason phrase. Customers should make decisions based on the number and fields, not text like “OK” or “Unauthorized”. In APIs, error responses can add an issue format, correlation, and details, but the body does not replace status semantics.

Table 3 - Frequent codes in corporate APIs.
CodeOperational meaningPoint of attention in gateways
200Operation completed with representation.It can be cached according to fields and method.
201Resource created.Location can identify the new resource.
204Success without content.Do not invent a body during transformation.
304Stored representation remains valid.It's not a normal body response.
400Invalid request.It can come from parsing, validation or contract.
401Missing or invalid credentials.WWW-Authenticate describes the challenge.
403Entity understood but not authorized.Not to be confused with authentication failure.
404Resource not found or hidden.It could come from gateway routing.
409Conflict with current state.Useful in competition and idempotence.
413Content too big.Limit may exist in each intermediary.
429Limit exceeded.Retry-After can guide retry.
502Invalid response from upstream.Investigate connection and parsing between gateway and backend.
503Service unavailable.Empty pool, maintenance or overload.
504Gateway Timeout.Find out which hop expired first.

fields: metadata, scope and normalization

fields are extensible name-value pairs. They carry information about control, , caching, authentication, negotiation and intermediaries. Names are case-insensitive, although values ​​may have specific rules. A field can allow a single occurrence, multiple occurrences, or a composable list. Implementations should not concatenate fields indiscriminately, especially `Set-Cookie`, whose semantics require specific treatment.

RFC 9110 distinguishes end-to-end fields from connection-related information. /1.1 uses the Connection field to declare field names that apply only to the next hop. Intermediaries must remove these fields before forwarding. /2 and prohibit several connection-specific fields, as streams and frames replace mechanisms like `Transfer-Encoding: chunked`. Replicating /1.1 headers without understanding their scope can lead to protocol failures.

Normalization is necessary but dangerous. Gateways can change capitalization, order, combine lines, remove optional spaces, or reconstruct messages. Applications should not depend on the order of fields. On the other hand, signatures and authentication schemes can define explicit canonicalization. A gateway policy that modifies signed values ​​must be executed before signing or preserve exactly the covered components.

Table 4 - Relevant field categories for APIs.
CategoryExamplesFunction
Routing and targetingHost, ForwardedIdentify authority and path through intermediaries.
RepresentationContent-Type, Content-Encoding, Content-LanguageDescribe the transferred content.
NegotiationAccept, Accept-Encoding, Accept-LanguageExpress customer preferences.
CacheCache-Control, Age, ETag, VaryControl storage and reuse.
AuthenticationAuthorization, WWW-AuthenticatePresent credential or challenge.
ConditionIf-Match, If-None-Match, If-Modified-SinceExecute operation according to known state.
Observabilitytraceparent, tracestate, correlationPropagate context between services.

Representations, media types and

A resource is an abstraction; the is a sequence of bytes and metadata that describes a state of that resource. The same resource can be represented as JSON, XML, CSV, or image. ` -Type` reports the media type of the sent , while `Accept` expresses which types the client considers acceptable. Sending JSON without ` -Type: application/json` forces the receiver to infer or reject the .

can occur proactively, using Accept, Accept-Encoding and Accept-Language fields, or reactively, when the server offers alternatives. The field informs which dimensions of the request influenced the response selection and is essential for caches. If a response varies by `Accept-Encoding`, a cache should not hand over gzipped bytes to a client that does not accept them.

-Encoding describes transformations applied to the , such as gzip or br. It should not be confused with Transfer-Encoding, which in /1.1 participates in message . Gateways that decompress for inspection need to decide whether to recompress, correct -Length, preserve when semantically valid, and consider expansion limits to prevent decompression attacks.

GET /reports/2026 HTTP/1.1
Host: api.example.com
Accept: application/json, application/xml;q=0.8
Accept-Encoding: br, gzip
HTTP/1.1 200 OK
Content-Type: application/json
Content-Encoding: gzip
Vary: Accept, Accept-Encoding

cache: freshness, reuse and invalidation

caching is not just a browser optimization. CDNs, reverse proxies, and gateways can store responses and serve requests without calling the backend. RFC 9111 defines when a response can be stored, considered fresh, reused, or revalidated. Cache-Control carries directives such as max-age, no-cache, no-store, private, public and must-revalidate. `no-cache` does not mean “do not store”; means that the response needs to be validated before reuse, except for specific rules.

The age of a response considers the time since its generation and permanence in caches. The Age field informs estimated age. Shared caches must respect authorization and privacy policies. In banking APIs, storing custom responses without proper cache key can cause leakage between users. The key typically includes URI and dimensions indicated by , but gateways can add specific rules depending on identity, tenant or product.

Invalidating cache is difficult because copies can exist at multiple levels. Strategies include short TTL, URI versioning, explicit purging, and revalidation. The choice needs to balance consistency, cost and availability. An unavailable backend can be protected by stored responses, but serving old information in financial operations may be unacceptable. Cache policy is a domain decision, not just a performance one.

Conditional cache revalidation flow with ETag
Figure 5 - Conditional revalidation with .

Conditional requests and concurrency control

Conditional requests allow you to perform an operation only if the resource state satisfies a condition. `If-None-Match` is used to revalidate cache or guarantee creation only when no current exists. `If-Match` requires that the current entity matches an and is useful for avoiding lost updates. Date-based fields, such as If-Modified-Since and If-Unmodified-Since, have lower granularity and reliability than opaque validators.

is an identifier of the selected . A strong indicates byte-to-byte equivalence suitable for operations such as ranges; a weak one indicates sufficient semantic equivalence for certain cache uses. It does not need to be a cryptographic hash or reveal an internal version. Gateways that transform can invalidate the backend's , because the delivered to the client is no longer the same.

In optimistic control, the client reads a with , changes it locally and sends PUT or PATCH with If-Match. If another actor modified the resource, the server responds 412 Precondition Failed. This avoids silently overwriting a concurrent update. The policy must be implemented in the component that controls the business state; a gateway can validate presence and format, but it does not know the current version of the resource on its own.

GET /accounts/123
<- ETag: "v17"
PATCH /accounts/123
If-Match: "v17"
Content-Type: application/merge-patch+json
{"nickname":"Reserva"}
<- 204 No Content   or   412 Precondition Failed

/1.1: textual syntax and byte

/1.1 represents messages as a start line, field sequence, empty line, and optional . Lines are delimited by CRLF. A request starts with method, request-target and version; a response starts with version and status. Although tools display messages in a readable form, the implementation needs to handle octets, limits, spaces and prohibited characters according to the specification. Excessive tolerance for invalid messages is a recurring source of inconsistency between intermediaries.

The receiver needs to determine where each message ends in a persistent connection. TCP delivers a boundaryless message : a `recv()` can return part of a line, multiple lines, or data from consecutive messages. The parser accumulates bytes, recognizes the field section and applies rules. The connection cannot simply use “end of packet” as a boundary, as IP packets and TCP segments are inferior details that can be split or combined.

In APIs, size limits for initial row, fields, and exist across clients, WAFs, gateways, and servers. A field accepted by the edge may be rejected by the gateway; a payload allowed by the gateway may exceed the backend. Settings need to be coordinated. Errors 400, 413, 414 and 431 help to differentiate between malformed requests, large , long URIs and excessive fields.

HTTP-message = start-line CRLF
               *( field-line CRLF )
               CRLF
               [ message-body ]

in /1.1: -Length, chunked and no body

-Length reports the length of the in octets. When valid, the receiver reads exactly that amount after the empty line. `Transfer-Encoding: chunked` encodes into blocks, each preceded by hexadecimal size, and ending with chunk zero and optional trailers. Chunked allows you to transmit without knowing the total size in advance, but it is a hop-by-hop mechanism and does not appear in /2 or .

Not every answer has a body. Responses to HEAD do not include , although the fields describe what a GET would have returned. Codes 1xx, 204 and 304 have specific rules without . Successful responses to CONNECT change the connection to tunnel mode. In other cases, closing the connection may limit the response, but this prevents reuse and is less robust.

Multiple -Length with different values, improper combination of -Length and Transfer-Encoding or invalid chunked syntax need to be treated as an error. If a proxy and a backend choose different rules, they may disagree about where the request ends up. The result can range from connection corruption to . The safe strategy is strict parsing and consistent normalization before forwarding.

Ways to delimit message content in HTTP/1.1
Figure 6 - Two common ways to delimit in /1.1.
Table 5 - Length determination in HTTP/1.1.
SituationHow length is determinedNote
Reply to HEADNo contentFields can describe an equivalent GET.
1xx, 204, 304No contentFraming should not invent bodysuits.
CONNECT 2xxTunnel after headersFollowing bytes are not ordinary HTTP messages.
Chunked Final Transfer-EncodingChunks down to size zeroTrailers can follow chunk zero.
Valid Content-LengthExact number of octetsConflicting values are an error.
Response without explicit framingUntil connection closesNot reusable and susceptible to truncation.

Persistent connections, reuse, pooling and timeouts

/1.1 uses persistent connections by default. After a response, client and server can reuse TCP/TLS for new requests, reducing handshakes and latency. Reuse is only safe when the previous message has been completely delimited and consumed. If a client abandons a body without reading it, the connection may become misaligned for the next transaction.

Gateways maintain pools of connections for backends. The pool separates the client connection from the upstream connection: hundreds of clients can share a pool of persistent connections, depending on competition and capacity. Relevant parameters include maximum per target, idle time, lifetime, connect timeout, read timeout, and validation before reuse. A load balancer can terminate idle connections before the gateway, causing resets by reusing apparently valid sockets.

Timeouts must form a coherent budget. The customer has to wait longer than the edge; the edge, more than the gateway; the gateway, enough time for the backend, but less than the total consumer limit. If everyone uses the same value, components can expire simultaneously and produce retry storms. Logs need to distinguish connection time, sending, waiting for the first byte and reading the .

Table 6 - Connection timeouts and limits.
ParameterWhat limitsSymptom when inappropriate
Connect timeoutTCP/TLS establishment upstreamFail quickly or wait too long before sending.
Read/response timeoutWaiting for response or data504 even when backend completes later.
Idle timeoutTime without traffic on reusable connectionRST when reusing connection terminated by another hop.
Max lifetimeTotal connection lifeHelps renew DNS and distribute connections.
Pool sizeConcurrent connections by destinationLocal queue, latency or excess sockets.
Total request timeoutOperation budgetIt needs to include policies and all the jumps.

Pipelining and in /1.1

Pipelining allows you to send multiple requests over a connection without waiting for each response. However, responses must be issued in the same order. If the first request takes time, ready responses from subsequent requests are delayed. This blocking is known as head-of-line at the /1.1 level. The complexity of retries, intermediary servers, and inconsistent implementations has limited the practical adoption of pipelining.

Customers have often worked around the problem by opening multiple parallel connections per source. This increases handshakes, port usage, queue congestion, and pressure on balancers. For APIs, multiple connections may distribute load differently than an /2 connection with many streams. Metrics based only on “active connections” fail to correctly represent competition when versions coexist.

/2 was designed to multiplex independent requests without imposing global ordering of responses. Still, all frames travel over a TCP , so a segment loss can delay the delivery of later bytes from all streams. moves isolation to transport.

Head-of-line blocking in HTTP/1.1 pipelining responses
Figure 7 - Head-of-line in /1.1 pipelining.

Intermediaries, hop-by-hop fields and transformation

Proxy is an participant that receives one message and forwards another. It can select the next destination, apply authentication, transform , cache, or record telemetry. A gateway acts as an intermediary with API-driven policies. The output message does not need to be byte-for-byte the same as the input, but it must preserve the defined semantics and meet security requirements.

Hop-by-hop fields belong to a single connection and should not be automatically forwarded. In /1.1, Connection declares options applicable to the hop; TE has restricted use; Transfer-Encoding and Upgrade describe the current connection. /2 and remove or replace these concepts. A gateway translates , and should not send `Transfer-Encoding: chunked` in an /2 .

Transformations can change -Length, -Encoding, , signature, cacheability and streaming. A policy that converts XML to JSON needs to define a new -Type and recalculate length. If the gateway buffers to validate schema, the first response may be slower and memory consumption may increase with payloads. The architecture must document which transformations are allowed and at which jump.

Operating rule

Capture the logical message before and after each relevant policy. Comparing only edge packets with backend logs ignores transformations introduced along the way.

Divergent parsing and /1.1 message security

occurs when two participants interpret message boundaries differently. An attacker sends an ambiguous string; the first proxy considers a part as a body, while the second interprets remaining bytes as a new request. This can bypass controls, poison cache, mix responses between users or take unforeseen routes. Classical variations exploit conflicts between -Length and Transfer-Encoding, but the general problem is parsing disagreement.

Response splitting explores the insertion of line delimiters into values that end up embedded in headers, creating additional fields or responses. Implementations need to reject disallowed CR and LF. Inconsistent normalization of spaces, names, and characters can also create discrepancies. The principle is to accept only valid syntax, reject ambiguities and avoid forwarding partially interpreted messages.

/2 and have binary , but can participate in attacks when an intermediary converts messages to /1.1 in an insecure way. An H2 request may contain metadata that, when serialized, creates ambiguities in the H1 backend. Therefore, security requires validation at the point of translation, not just at the edge. Recent specification updates also refine Upgrade requirements and anticipated data; Operators must keep track of errata and RFCs that update behavior.

Request smuggling caused by divergent framing interpretations
Figure 8 - Conceptual example of through divergent .

Defense in depth

Use conforming parsers, remove ambiguous combinations, normalize once, keep frontend and backend updated, and explicitly test H2/H3 to H1 translations.

/2: binary layer

/2 is an optimized expression of semantics. After the connection is established, participants exchange binary frames with a fixed header that informs length, type, flags and ID. HEADERS frames carry blocks of compressed fields; DATA carries ; SETTINGS negotiates parameters; WINDOW_UPDATE controls flow; RST_STREAM ends a ; initiates coordinated termination of the connection.

An message is mapped to a sequence of frames in a . The has an independent identifier and life cycle. An operation's request and response use the same . Frames from different streams can be interleaved, allowing concurrency without opening a TCP connection for each call. The receiver reconstructs each message using ID and flags such as END_HEADERS and END_STREAM.

The protocol starts with a connection preface and exchange of SETTINGS. Parameters include field table size, maximum number of simultaneous streams, initial window size, and maximum frame size. SETTINGS needs to be confirmed. Settings are directional: what an endpoint advertises limits the peer's behavior when sending to it.

Frames from different streams interleaved over an HTTP/2 connection
Figure 9 - Frames from multiple streams sharing an /2 connection.
Table 7 - Important HTTP/2 frames.
FrameScopePurpose
DATEStreamMessage content and possible END STREAM.
HEADERSStreamStarter block or compressed trailers.
SETTINGSConnectionDirectional parameters and capabilities.
WINDOW UPDATEConnection or streamIncrease flow control credit.
RST STREAMStreamAbort specific operation.
PINGConnectionMeasure liveness/RTT without HTTP semantics.
GOAWAYConnectionStop new streams and drain existing ones.
PRIORITY UPDATEStreamSignal priority by current extensible template.

Streams, states, and shutdown

Streams can be idle, open, half-closed, reserved or closed, depending on frames sent and received. END_STREAM closes the sender direction, allowing the other direction to continue. RST_STREAM immediately terminates the and reports an error code. errors don't have to bring down the entire connection; Connection errors require and shutdown.

contains the largest ID that may have been processed and an error code. The peer must not create new streams in the connection and can repeat operations above the limit, considering . In deployments and draining, gateways must issue and allow completion of accepted streams. Terminating TCP abruptly turns planned maintenance into indistinguishable network failures.

The number of competing streams is limited by SETTINGS_MAX_CONCURRENT_STREAMS and local resources. A client may maintain a connection, but be blocked waiting for credit to open a new . Metrics should show active, pending, and rejected streams, not just connections. A single client with /2 can generate high competition for a connection.

Table 8 - Lifecycle events in HTTP/2.
EventEffectOperational decision
END STREAM in requestCustomer finished content.Gateway can initiate full processing or streaming.
END STREAM in responseServer finished message.Stream may close if both directions have ended.
RST STREAMCancels specific stream.Register launcher and code; business effect may already exist.
GOAWAY NO ERRORCoordinated drainage.Open new connection for new streams.
GOAWAY with errorConnection failure.Evaluate retries by stream and idempotence.
Stream limitNew operations await.Increase connections or adjust competition cautiously.

, and memory pressure

allows frames to be interleaved, but does not eliminate the need for backpressure. /2 applies to DATA at the connection and level. The receiver announces credit; as it consumes bytes, it sends WINDOW_UPDATE. If the application does not read a , its window may reset. If the connection window resets, all streams are prevented from sending DATA, even if some consumers are fast.

is not the same as TCP congestion control. The first protects receiver and application buffers; the second adapts sending to the network capacity. Both act simultaneously. Increasing windows can improve throughput on high bandwidth-delay product paths, but increases potential memory. Gateways need to limit streams, frames, fields and to prevent a few clients from monopolizing resources.

The original /2 had a dependency and weighting mechanism for priorities that proved difficult to implement in an interoperable way. The current specification removes the old core model and allows for an extensible schema. Operators should not assume that client priority will be honored end-to-end, especially when there are proxies that reorder or convert protocols.

HTTP/2 multiplexing and residual blocking caused by TCP loss
Figure 10 - /2 and residual blocking caused by TCP.

Classic symptom

A healthy TCP connection, responding /2 ping and some stopped streams may indicate an exhausted flow window or an application that has stopped consuming .

: per-connection stateful field compression

APIs repeat fields such as method, schema, host, type, and authentication. Sending them in full with each request increases overhead. compresses blocks of fields using a static table of common entries, a dynamic table constructed during connection, literal representations, and Huffman coding. A repeated entry can be referenced by index instead of relaying name and value.

The pivot table is directional and synchronized by the order of the blocks in the connection. The encoder decides which values ​​to enter; the decoder maintains the same sequence. Changing the table size or receiving an invalid index may generate a compression error and terminate the connection. Intermediaries end : the gateway decodes client fields and creates its own encoding when connecting to the backend.

Sensitive fields such as Authorization or cookies should not be indexed when doing so increases risk or retention. includes “never indexed” . Compression also interacts with side-channel attacks when secrets and controlled data share context. Field list size limits remain necessary, because a compact can expand to a lot of metadata.

Field blocks, static and dynamic tables, and compact HPACK representation
Figure 11 - Conceptual components of .

Negotiation: TLS, , h2 and h2c

On the secure web, /2 is typically negotiated over TLS over . The client advertises protocols, for example `h2` and ` /1.1`; the server selects one and reports it in the handshake. This avoids sending a request in the wrong format. The certificate and name still need to be valid for the . Once h2 is selected, the client sends the preface and /2 frames.

/2 can also operate without TLS using the h2c identifier, with prior knowledge or Upgrade from /1.1, but this mode is less common on public traffic. In internal networks, some components use h2c for gRPC, while TLS terminates in sidecar or gateway. This decision reduces encryption by one leap and needs to be evaluated according to trust, compliance and observability.

allows an /2 connection to be reused for multiple sources when resolution, certificate, and requirements are met. This improves efficiency, but can surprise connection-based balancing. Gateways and CDNs need to prevent unauthorized from being served on the connection. Logical remains determined by semantics, not just the connected IP address.

HTTP/2 or HTTP/1.1 negotiation over ALPN during TLS handshake
Figure 12 - Negotiation of the application protocol with .

: semantics over

maps semantics to . is a connection-oriented transport encapsulated in UDP, with streams, , loss detection, congestion control, security and path migration. TLS 1.3 is integrated into the handshake; There is no mode without cryptographic protection as per the specification. The application sees individually ordered, reliable streams, not raw UDP datagrams.

Just like /2, uses HEADERS and DATA frames, but the frames travel in streams. Each request uses a bidirectional initiated by the client. Unidirectional streams carry control and . Functions that already offers, such as ID and , are not duplicated by the layer. Therefore, some /2 frames and mechanisms disappear or change.

Using UDP does not mean that is unreliable. implements commit, retransmission, and ordering. The difference is that these functions are in user space, integrated with cryptography and capable of evolving without depending on the operating system's TCP implementation. Firewalls and middleboxes that block UDP can prevent , requiring a fallback to /2 or /1.1.

Comparison of HTTP/1.1, HTTP/2, and HTTP/3 stacks
Figure 13 - Simplified stacks of /1.1, /2 and .

Mental model

is not “ /2 over UDP”. It reuses ideas from streams and frames, but delegates to properties that in /2 depend on separate TCP and TLS.

handshake, TLS 1.3 and 0-RTT

The handshake negotiates transport parameters and runs TLS 1.3. On a new connection, the client can send an Initial packet containing ClientHello data; the server responds and the keys evolve through encryption levels. Under normal conditions, application data can be sent with a low number of round trips. protects almost all control , reducing the passive visibility available to middleboxes.

On resumed connections, 0-RTT may allow the client to send application data before fully acknowledging the new handshake. This data does not have the same replay protection as 1-RTT data. Servers should accept 0-RTT only for replay-safe operations or apply anti-replay and mechanisms. A financial POST should not be considered secure just because it uses TLS.

applies amplification protection before validating the client address: the server limits bytes sent relative to those received. Retry tokens can help validate and control abuse, at the cost of additional round tripping. Gateways at the edge need to scale handshake state, thresholds, and DoS protection without treating all UDP as sessionless traffic.

Table 9 - Relevant steps of QUIC establishment.
PhaseProtection/propertyOperational risk
InitialDerivable keys to enable routing and handshake initiation.Not to be confused with lack of integrity; content is not strong secret against observer.
HandshakeTLS authenticates and negotiates final keys.Loss or blocking of UDP appears as failure before HTTP.
1-RTTNormal data protected.Active streams and flow control.
0-RTTEarly data in resumption.Possible replay; restrict operations.
RetryAdditional address validation.Increases latency, reduces amplification and abusive state.

streams and head-of-line elimination between streams

Each offers reliable, orderly delivery within the itself. Packets can carry frames from multiple streams. If a packet with data from B is lost, the receiver can continue delivering complete data from streams A and C. Only the missing point from B prevents orderly advancement of that . This eliminates the traversal blocking caused by single- TCP over /2.

Improvement does not eliminate every blockage. A remains ordered; Losing early bytes prevents delivering later bytes from the same . Connection can also block all streams if the receiver does not grant credit. dependencies can suspend decoding of a block of fields. Therefore, metrics and traces need to distinguish packet loss, blocked by data, blocked by fields and connection window.

numbers data and acknowledges packets, but retransmits information in new packets, not “the same packet”. Packet numbers are never reused in the same space. Loss detection and congestion control were specified in associated documents. Implementation in user space allows evolution, but also requires specific observability of the library or proxy that terminates .

Loss isolation between streams of a QUIC connection
Figure 14 - Loss isolation between streams.

Connection IDs, NAT rebinding and path migration

TCP identifies a connection by its set of addresses and ports. If a mobile device switches from Wi-Fi to cellular, the tuple changes and the connection is typically lost. uses Connection IDs chosen by endpoints, allowing you to associate packets from a new path to the existing connection. The new path is validated with challenges before being used fully.

Connection IDs also allow balancers to forward packets without relying exclusively on the tuple. The design needs to consider privacy and prevent a stable identifier from allowing cross-network tracking; Endpoints can provide multiple IDs and retire them. -aware gateways and load balancers need to coordinate routing, retry/reset keys, and affinity.

Migration is not a guarantee of continuity in any environment. Policies can disable it; firewalls can block the new path; the server may require validation; MTU and RTT changes alter performance. Logs must record migration and path validation to differentiate legitimate network exchange from instability or attack.

QUIC path migration with Connection IDs and new address validation
Figure 15 - Path validation and migration in .

Frames and control streams in

An connection has one per endpoint. It sends SETTINGS, and other control frames. Prematurely closing the is a connection error. Requests use bidirectional streams from the client; each carries HEADERS, DATA, and trailers as permitted. Frames of a message cannot appear in any arbitrary order.

As provides and reset, uses transport mechanisms for part of the lifecycle. Errors have and codes. A cancellation may involve resetting the shipment and requesting to stop the opposite direction. Observability must associate , request and application correlation, as a single can carry many operations.

removes features from /2 that depended on the TCP , but preserves the concept of drainage. limits new accepted request streams. In deploy, the edge must announce closure, maintain the connection while allowed operations end, and direct new calls to another connection. Closing UDP state abruptly causes loss of all active operations.

Table 10 - Basic structure of an HTTP/3 connection.
HTTP/3 elementTransportUsage
Request streamCustomer-initiated bidirectional QUICA request and its response.
Control streamUnidirectional QUIC per endpointSETTINGS, GOAWAY and HTTP control.
QPACK encoder streamUnidirectional QUICPivot table updates.
QPACK stream decoderUnidirectional QUICConfirmations and cancellations.
HEADERSFrame HTTP/3Starting pitches or trailers.
DATEFrame HTTP/3Message content.

: field compression suitable for streams

depends on the unique TCP connection order to synchronize the pivot table. In , streams can be delivered independently; a missed table update should not unnecessarily block all streams. uses unidirectional encoder and decoder streams to transmit instructions and acknowledgments, allowing blocks of fields in request streams to make controlled references.

A block can depend on inputs not yet received and block until instructions arrive. The decoder announces limits for the number of blocked streams, and the encoder chooses between better compression and risk of blocking. Literal representations and static table allow you to avoid dependencies. As with , sensitive values ​​can be marked for non-indexing.

Gateways terminate and create new context on next connection. A failure is a connection error and can affect many requests. Monitoring only status does not reveal this class of failure, because the message may not be reconstructed. terminator logs must expose decompression error codes and blocked streams.

Encoder, decoder, requests and dynamic table flows in QPACK
Figure 16 - conceptual flows.

, , HTTPS/SVCB discovery and fallback

A client needs to know which offers and on which endpoint. RFC 9114 defines advertisement by Alternative Services: an /1.1 or /2 response may include ` : h3=":443"`. The client stores the alternative for a limited time and tries . DNS can also provide HTTPS/SVCB records with protocol and endpoint parameters. Support varies between customers and infrastructure.

The logical source remains the same, even if the alternative service is on a different host or port. The client needs to validate the and certificate according to the rules. is not application redirection and does not change the displayed URI. If the attempt fails, clients typically continue or fall back to /2/1.1, but timing and failure cache details are implementation dependent.

When troubleshooting, confirm that the client received an announcement, that UDP was attempted, that h3 was negotiated and that fallback occurred. A capture of just TCP traffic can show the call working and hide failed attempts. Blocking UDP/443 can increase initial latency even when fallback maintains availability. Incorrect HTTPS/SVCB records may direct modern clients to a different endpoint than the one used by legacy clients.

Discovery, QUIC attempt, and fallback to HTTP/2 or HTTP/1.1
Figure 17 - discovery, attempt and fallback.
HTTP/1.1 200 OK
Alt-Svc: h3=":443"; ma=86400
# The client can attempt a QUIC connection to the same origin on port 443.

Architectural comparison between /1.1, /2 and

Choosing a version is not just looking for “the newest one”. /1.1 has broad compatibility and simple observability, but requires more connections for concurrency and suffers from sequential blocking. /2 reduces overhead and allows many streams in one connection, being essential for gRPC, but it concentrates operations on a TCP and requires and flow metrics. improves behavior under loss and mobility, but depends on UDP, ends encryption in the component that needs to interpret , and changes networking practices.

Earnings depend on the profile. In a stable network and low latency, a small API may show modest difference. In lossy mobile connections, can reduce impact between streams and preserve connection during path change. In an enterprise architecture with many intermediaries, the end-to-end benefit may be reduced if the edge receives H3 but the rest use H1.1 with saturated pools.

Protocols also affect capacity. Ten thousand requests can use thousands of H1 connections, hundreds of H2 or H3 connections, depending on concurrency and limits. Balancing by connections is less representative in . A single client can concentrate streams on one instance. Algorithms, limits and observability need to evolve with the protocol.

Table 11 - Summary comparison of versions.
AppearanceHTTP/1.1HTTP/2HTTP/3
TransportTCP; Separate TLS over HTTPSTCP; typically TLS + ALPNQUIC over UDP; Integrated TLS 1.3
FormatLines and textual fieldsBinary framesFrames over QUIC streams
CompetitionSequential/pipeline; multiple connectionsMultiplexed streamsLoss-isolated multiplexed streams
Field compressionNot standardized in the protocolHPACKQPACK
HOLOn HTTP and TCPEliminates HOL HTTP; keeps TCP HOLLoss blocks only affected stream
Network migrationConnection often breaksConnection often breaksConnection IDs and path validation
Passive ObservabilitySimpler after TLS terminationFrames after TLS terminationMore encrypted control; requires QUIC terminator
CompatibilityMaximumBroad on modern browsers/proxiesDepends on UDP and edge support

API Gateways and per-hop protocol translation

In an enterprise chain, each component can negotiate its own version. A client uses with a CDN; CDN uses /2 with API Gateway; the gateway uses /1.1 with the backend. Semantics need to be preserved, but , compression, and connection are reconstructed. There is no H3 “traversing” a gateway that ends .

Translation changes behavior. Many multiplexed requests from an H2 connection may require multiple H1 connections to the backend or be serialized according to pooling. Trailers may be lost if the next protocol or product does not preserve them. A reset can turn into a socket cancellation, while the backend has already processed the operation. on one side has no direct correspondence in an independent connection on the other side.

Policies must be semantic. Rate limiting per connection is inappropriate when a connection contains hundreds of streams. Payload limits need to consider uncompressed size. Cache must use correct and . Observability needs to record inbound version, outbound version, reuse, ID when available, retry attempt and status created by the gateway.

HTTP versions negotiated independently at each architecture hop
Figure 18 - Independent versions at each hop of the architecture.

Architecture question

What is the version negotiated in each real connection: client-edge, edge-gateway, gateway-mesh and mesh-backend? The answer “the API uses /2” is usually incomplete.

Using Axway API Gateway

Axway API Gateway uses services to receive traffic and configurations from remote hosts for outgoing connections. In a real design, listener, interface, TLS, policy, routing and destination configurations participate in different hops. The investigation must separate the version and fields received by the listener from what is produced when connecting to the remote host. The documentation and installed version need to be consulted, as capabilities and standards may by release.

When forwarding to a backend, persistent connection and pooling influence latency, distribution and socket consumption. Legacy configurations can use conservative behaviors, and teams must explicitly validate the desired outbound version. Transformations and filters can change , fields, and streaming. Transaction Access Logs and policy tracing should record final status, connection time, response time, and routing error.

A common scenario is that the client observes /2 at the edge, but the backend records /1.0 or /1.1. This is not necessarily an error; it could be a decision or default of the outbound hop. The risk arises when the application depends on trailers, streaming or competition that does not survive translation. Tests must cover the actual protocol, not just the public endpoint.

Table 12 - Evidence for investigating HTTP on Axway API Gateway.
CheckpointEvidenceQuestion
HTTP service/listenerPort, TLS and protocol configurationWhat does the client negotiate with the gateway?
Policy flowTrace filters and transformationsWhat fields and content have changed?
Routing/remote hostTarget, version, pool and timeoutHow does the gateway create the upstream connection?
Access logstatus, bytes, times, correlationWho produced the response and how long did it take?
Backend logprotocol and authority observedWhat actually got into the service?

Application in Azure API Management

In Azure API Management, the gateway receives calls, applies policies, and routes them to backends. Support for /2 inbound, outbound and gRPC depends on gateway type and generation, tier and configuration. The `forward-request` policy has an version attribute for supported scenarios. As the platform evolves, the official documentation must be treated as the source of truth for the instance used.

The inbound version does not imply an outbound version. Current documentation describes behaviors where certain generations support /2 and can downgrade forwarding, while others allow you to configure /2 for the backend. This affects gRPC, trailers, and streaming. Tests should record `context`/traces, backend diagnostics, and instance metrics to confirm the effective path.

Policies such as rewrite-uri, set-header, set-body, cache, retry and rate-limit operate on the logical message and can change observed characteristics. Retry needs to consider . Set-body generally implies access to and may require buffering. Cache must respect identity and . When combining Application Gateway, Front Door, APIM and backend, each service terminates its own connection and may have a different timeout.

Table 13 - Points of attention in Azure API Management.
APIM ElementHTTP ImpactValidation
Gateway ProtocolsInbound and TLS capabilitiesCheck configuration and tier.
forward-requestVersion and timeout from jump to backendConfirm support of the gateway used.
Retry policyCan repeat call after failureClassify method and idempotence.
set-header/rewrite-uriChange forwarded messageCompare trace with backend log.
Cache policiesCan respond without upstreamValidate key, TTL and privacy.
Diagnostics and telemetryDistinguish policy, gateway and backendPropagate correlation/trace context.

Observability: what to measure in each version

Common metrics include request rate, status, latency, bytes, and errors. For /1.1, add open connections, new connections per second, reuse, pool wait, and resets. For /2, measure active streams per connection, concurrency threshold, RST_STREAM, , window, and compression errors. For , include retries, success/fallback, handshake, loss, RTT, migration, blocked streams, and errors.

Latency must be decomposed. DNS, connection, TLS/ , policy time, pool wait, time to first upstream byte and transfer answer different questions. A high “total” metric does not identify cause. Distributed tracing starts when there is an message; Previous failures may require network logs and terminators. The gateway must reliably create or propagate correlation identifiers.

Traffic captures remain useful, but encryption limits . In TLS over TCP, the terminator can provide key logging in a controlled laboratory. encrypts more control elements, so qlog and library metrics are valuable. In banking production, collection must respect sensitive data: do not record tokens, cookies, PAN, payloads or complete headers without masking and legal basis.

Table 14 - Specific observability by version.
MetricHTTP/1.1HTTP/2HTTP/3
Competition UnitConnection/requestStreamStream QUIC
Coordinated closureConnection: close / FINGOAWAY + streamsGOAWAY + QUIC closure
CancellationClosing connection may affect other callsRST STREAMReset/stop-sending per stream
Field compressionN/A at coreHPACK errorsQPACK errors and blocks
fallback signalNew connection in another versionALPN http/1.1QUIC failure followed by H2/H1
Relevant lossTCP retransmissionTCP retransmission affects streamsPath/stream loss and QUIC recovery

End-to-end troubleshooting method

The first step is to determine whether there was a valid response. DNS, TCP, UDP, TLS, or errors may occur before any status. Tools sometimes convert failures into generic messages, but the gateway cannot have produced 504 if the call didn't even reach it. Identify the last component that has evidence of the attempt and the first that does not.

When status exists, determine authorship. Compare public status, upstream status, internal error and executed policy. A 503 from the backend can be preserved; another 503 might be created by the gateway because no healthy endpoints were available. Headers like Server are not enough proof as they can be removed or faked. Use correlation and timestamps between controlled logs.

Then record version and connection on each hop. Confirm , outbound protocol, reuse, reset, , retry and timeout. Compare method, , path, relevant fields, and length before and after the gateway. For intermittent failures, look for patterns by connection, instance, , payload size, version, network, and deploy time.

Initial tree to classify failures before and after an HTTP response
Figure 19 - Initial tree to classify failures.
Table 15 - Matrix of symptoms and evidence.
SymptomPriority hypothesesEvidence
No response / connection errorDNS, firewall, TCP/UDP, TLS/QUIC, portdig/nslookup, connect trace, handshake, edge logs.
400 only via gatewayParsing, normalization, threshold, transformationRaw request in laboratory, policy trace, backend log.
413/431Limit content or fields in some jumpSettings and uncompressed actual size.
502Upstream failure/invalidity, reset, protocolInternal gateway error, backend capture and log.
503 flashingPool, health, stream/connection limit, deployMetrics per instance and connection.
504Gateway-backend hop timeout or chainLatency breakdown and timeout budget.
H2 works, H1 failsFraming, Trailers, Competition or HostComparison of the message after translation.
H3 slow before workingQUIC attempt fails and fallbackUDP/443, Alt-Svc/HTTPS RR and QUIC logs.
RST in reuseIdle timeout misalignedConnection age and closure on the other hop.
Duplicity after timeoutNon-idempotent operation retryAttempt logs and idempotence key.

Case Study 1: Duplicate POST after 504

A client sends POST to create a transfer. The gateway forwards it to the backend, which confirms the transaction at the bank, but takes a while to generate the response. The gateway timeout expires and returns 504. The client interprets it as failure and repeats the call. Since POST is not idempotent by definition and there is no deduplication key, the backend creates a second transfer.

The problem is not solved just by increasing timeout. The architecture must define semantics: client sends unique key; gateway preserves; backend records key and result atomically. On repeat, returns the previous result. The gateway can use retry only for failures clearly prior to submission or in classified operations. Logs need to show request ID, idempotency key, attempt and backend result.

Learning

Timeout means no confirmation to the observer, not proof of no effect on the remote system.

Case Study 2: Public /2 and /1.1 backend saturation

An edge receives thousands of /2 streams in a few connections and forwards them to the gateway. The gateway calls an /1.1 backend with a pool of 100 connections. During peak, streams enter quickly but wait for upstream connection. Inbound TCP metrics appear stable because there are few H2 connections; queue and latency grow in the outbound pool.

The solution requires measuring competition by and wait pool, applying admission limits, adjusting backend capacity and considering /2 outbound when supported. Increasing pool without evaluating resources can shift overload to the service. Rate limiting per connection would be ineffective, as an H2 connection concentrates many streams. The goal is to align logical competition with actual upstream capacity.

Learning

In multiplexed protocols, connection is no longer a good approximation for the number of simultaneous operations.

Case Study 3: advertised but UDP blocked

A CDN starts announcing ` : h3`. Modern clients try on UDP/443, but a corporate network blocks UDP. After a delay, the client falls back to /2 and the API works. Users report slowness only on first access; tests that force /2 do not reproduce. API logs show normal requests, because the attempt fails before the message arrives.

The investigation needs to look at DNS, , UDP packets, and fallback timing. The fix may involve enabling , removing advertising for specific networks when possible, or accepting fallback with monitoring. It should not be concluded that caused an application error. The problem lies in the discovery and establishment of the transport, prior to the transaction observed by the gateway.

Learning

Fallback availability can hide a path failure and add invisible latency in application logs.

Case study 4: H2 to H1 translation creates insecure

A proxy accepts /2 and converts pseudo-fields and DATA to /1.1. A malformed combination passes H2 validation, but generates two incompatible length signals in H1. The backend interprets the message differently and controlled bytes make up the next request in the persistent connection. The vulnerability only appears when the path includes the specific translation.

Mitigation requires validating the logical message before serializing H1, emitting exactly one mechanism, rejecting prohibited fields, updating intermediaries, and testing smuggling variations. Disabling reuse can reduce impact, but does not replace correction. WAF based only on H2 input text may not see the message produced to the backend.

Learning

The point of greatest risk is often the boundary between two parsers or versions, not an isolated parser.

Practical reading and diagnostic labs

Lab 1 - Compare /1.1 and /2 with cURL

Use a lab endpoint that supports both versions. Run calls forcing /1.1 and /2 and enable verbose output. Note resolution, connection, TLS, , request line displayed, reuse and timing. Repeat multiple calls in the same process to check reuse. Do not use productive endpoints or real tokens.

curl -v --http1.1 https://SEU-ENDPOINT-DE-LAB/status
curl -v --http2   https://SEU-ENDPOINT-DE-LAB/status
# Also record times:
curl -sS -o /dev/null -w "connect=%{time_connect} tls=%{time_appconnect} ttfb=%
{time_starttransfer} total=%{time_total}\n" https://SEU-ENDPOINT-DE-LAB/status

Lab 2 - Inspect with OpenSSL

Connect to a lab server and advertise h2 and /1.1. Confirm the selected protocol. Then force just /1.1 and compare. The goal is to realize that occurs in the TLS handshake before messages. In proxy environments, run from different network points to identify different endpoints.

openssl s_client -connect SEU-ENDPOINT-DE-LAB:443 -servername SEU-ENDPOINT-DE-LAB -alpn
"h2,http/1.1"
# Search for: ALPN protocol: h2

Lab 3 - Cache and revalidation

Create a lab service that returns and Cache-Control. Do a GET, store the and send If-None-Match. Confirm 304 no . Modify the resource and repeat. Add a controlled cache proxy and watch Age and . Document how authentication changes the possibility of .

curl -i https://SEU-ENDPOINT-DE-LAB/resource
curl -i -H "If-None-Match: \"ETAG-RECEBIDA\"" https://SEU-ENDPOINT-DE-LAB/resource

Lab 4 - /1.1 in an isolated environment

On a local server created for study, send messages with correct -Length and valid chunked. Notice how the server reads the body. Then test invalid inputs only in an authorized laboratory and confirm that they are rejected, without trying to exploit third-party systems. The goal is to understand parsing and validation, not to execute attacks.

printf "POST /echo HTTP/1.1\r\nHost: localhost\r\nContent-Length: 5\r\n\r\nhello" | nc
127.0.0.1 8080

Lab 5 - Observe and fallback

Use a lab tool and endpoint with known support. Record attempt, final protocol, and fallback when UDP is blocked in a test environment. Compare time to first byte. Do not change corporate firewalls without authorization. On clients that support qlog, generate a local trace and view handshake and streams.

curl -v --http3 https://SEU-ENDPOINT-DE-LAB/status
curl -v --http3-only https://SEU-ENDPOINT-DE-LAB/status
# The availability of options depends on the compilation of cURL and the QUIC library.

Lab 6 - Mapping versions by hop in the gateway

Publish a lab API that returns protocol, host, and correlation headers observed by the backend. Call the public endpoint in different versions and compare listener logs, policy traces, and backend output. Draw each independent connection and note TLS, , version, pool, timeout and transformation. This map is more useful than declaring a single “API version”.

  1. Register client-edge protocol.
  2. Register edge-gateway protocol.
  3. Register gateway-backend protocol.
  4. Compare Host/: and Forwarded fields.
  5. Execute call with large and observe buffering.
  6. Run controlled deploy and observe draining/ or resets.

Architecture Checklist for Enterprise APIs

Table 16 - Design and review checklist.
ThemeReview Questions
SemanticsDo methods and statuses follow their properties? Do retries respect idempotence?
URI/authorityAre host and original authority validated and preserved when necessary?
FieldsWhich ones are removed, created, signed, or trusted at each hop?
ContentIs there transformation, compression, buffering, streaming or uncompressed limit?
CacheWhat responses can be stored? Does the key consider identity and Vary?
HTTP/1.1Is framing strict? Are pools and idle timeouts coordinated?
HTTP/2What stream, field and window limits are configured? Is GOAWAY treated?
HTTP/3Is UDP allowed? Is there fallback? How are qlog and QUIC metrics collected?
GatewayHave inbound/outbound versions been confirmed by evidence?
ObservabilityAre public status, upstream status and internal error separate?
SecurityHave protocol translations been tested against ambiguities and smuggling?
CapacityIs competition measured by requests/streams, not just connections?

Chapter Summary

provides stable semantics for interaction between clients, servers and intermediaries. Methods express intention; statuses communicate results; fields describe control and ; cache and conditions allow for reuse and concurrency. These concepts are independent of JSON, REST, or the transport version.

/1.1 encodes textual messages into a TCP and requires strict rules. Persistent connections save handshakes, but pooling, timeouts, and divergent parsing create risks. /2 introduces frames, streams, , and , reducing overhead and head-of-line at the level, although TCP loss still affects all streams.

uses over UDP, integrates TLS 1.3, isolates loss per , supports Connection IDs and uses . Discovery can occur via and HTTPS/SVCB records, with fallback to previous versions. In gateways, each hop negotiates its own version; the professional needs to observe the logical message and connection of each segment.

Reliable troubleshooting starts by classifying whether the failure occurred before or after there was an response, identifying who created the status and mapping versions, timeouts, pools, streams and transformations. The architecture must protect semantics, , and security during translations between protocols.

Review exercises

  1. Explain the difference between semantics and specific version mapping.
  2. Why doesn't stateless mean that an application cannot maintain a session?
  3. Differentiate resource, , and .
  1. Which components of a URI participate in an request and which are not sent?
  2. Differentiate secure method from idempotent method and give examples.
  3. Why repeating POST after timeout can produce duplicity even when the client received 504?
  4. Who can create a 502 on a chain with multiple proxies?
  5. Why should reason phrase not be used in client logic?
  6. Differentiate -Type, -Encoding and Transfer-Encoding.
  7. Explain why is necessary in caching .
  8. What does `Cache-Control: no-cache` mean?
  9. How do and If-Match help avoid lost update?
  10. Why doesn't TCP preserve message boundaries?
  11. What risks exist when -Length and Transfer-Encoding are interpreted differently?
  12. Why can a persistent connection only be reused after completely consuming the previous message?
  13. Describe head-of-line in /1 pipelining.
  14. How does /2 map a request to frames and streams?
  15. Differentiate between /2 and TCP congestion control.
  16. What is the role of SETTINGS_MAX_CONCURRENT_STREAMS?
  17. How does help with deployments and draining?
  18. How does reduce overhead and why does it create per-connection state?
  19. What is the role of in /2 negotiation?
  20. Why is /2 still subject to TCP head-of-line?
  21. Why is stating that is “UDP untrusted” wrong?
  22. How does enable path migration?
  23. What is the risk of 0-RTT for effect trades?
  24. How does differ conceptually from ?
  25. How can advertise without changing the logical ?
  26. Why can an API use publicly and /1.1 in the backend?
  27. What additional metrics are needed in /2 and ?
  28. Propose a timeout budget for client, edge, gateway and backend.
  29. Design a secure retry strategy for payment GET and POST.
  30. Explain how an H2 to H1 translation can create a risk of .
  31. Describe the evidence needed to prove which version was used in each jump.

Architectural Discussion Questions

  • In an organization with thousands of APIs, what criteria justify enabling /2 or at the edge and backend?
  • How should balancers distribute load when few connections carry many streams?
  • Which fields should be removed or rebuilt in a chain with CDN, WAF, gateway and service mesh?
  • How to guarantee of financial operations when timeouts and retries can occur in several components?
  • What level of observability is acceptable in a regulated environment without exposing sensitive data?
  • When is buffering at the gateway necessary and when does it destroy streaming benefits?
  • How to test parsing and protocol translation security on an automated conveyor belt?

Glossary

Table 17 - Chapter glossary.
TermDefinition
ALPNTLS extension used to negotiate the application protocol, such as h2 or http/1.1.
Alt-SvcMechanism for advertising alternative HTTP service, including HTTP/3 endpoint.
AuthorityComponent that identifies the host and logical port of the source.
Shared cacheCache that can reuse responses for more than one user or client.
Connection coalescingControlled reuse of an HTTP/2 connection to more than one origin.
Connection IDQUIC identifier that allows you to associate packets with the connection beyond the IP/port tuple.
ContentMessage data sequence after appropriate framing decodes.
Content negotiationSelection of representation according to preferences and capabilities.
Control streamUnidirectional HTTP/3 stream that carries connection control.
End-to-end fieldField whose meaning applies to final endpoints, even through intermediaries.
ETagOpaque validator associated with a representation.
Flow controlMechanism that prevents the sender from exceeding buffers announced by the receiver.
FramingRules for determining limits and content of messages in transport.
GOAWAYSignal that a connection will not accept new streams/requests beyond a certain limit.
HEADERS frameFrame that transports compressed block of fields in HTTP/2 or HTTP/3.
Head-of-line blockingDelay in independent operations caused by a missing or slow previous item.
HPACKField compression used by HTTP/2.
HTTP/3Mapping HTTP semantics to QUIC.
IdempotenceProperty by which repeating the same intention produces the same intended effect.
IntermediateHTTP participant that receives and forwards messages, such as a proxy or gateway.
MultiplexingSharing a connection across multiple independent exchanges.
OriginLogical source responsible for the resource identified by the URI.
Pseudo-headerSpecial HTTP/2/3 field starting with a colon, such as :method.
QPACKField compression used by HTTP/3.
QUICSecure, multiplexed transport over UDP used by HTTP/3.
RepresentationData and metadata that represents the state of a resource.
Request smugglingAttack based on divergence on request limits between intermediaries.
Safe methodMethod whose intention is essentially reading.
StreamLogical and ordered channel within a multiplexed connection.
TrailerField sent after the message content.
ValidatorMetadata used to test whether the stored representation remains valid.
VaryField that informs dimensions of the request used to select a response.

The references below prioritize specifications and official documentation. RFCs must be consulted with their errata and any documents that update them. Product documentation must be validated for the version, tier and gateway used in the environment.

  1. RFC 9110 - Semantics - https://www.rfc-editor.org/rfc/rfc9110.html
  2. RFC 9111 - Caching - https://www.rfc-editor.org/rfc/rfc9111.html
  3. RFC 9112 - /1.1 - https://www.rfc-editor.org/rfc/rfc9112.html
  4. RFC 9113 - /2 - https://www.rfc-editor.org/rfc/rfc9113.html
  5. RFC 9114 - - https://www.rfc-editor.org/rfc/rfc9114.html
  6. RFC 7541 - : Header Compression for /2 - https://www.rfc-editor.org/rfc/rfc7541.html
  7. RFC 9204 - : Field Compression for - https://www.rfc-editor.org/rfc/rfc9204.html
  8. RFC 9000 - : A UDP-Based Multiplexed and Secure Transport - https://www.rfc-editor.org/rfc/rfc9000.html
  9. RFC 9001 - Using TLS to Secure - https://www.rfc-editor.org/rfc/rfc9001.html
  10. RFC 9002 - Loss Detection and Congestion Control - https://www.rfc-editor.org/rfc/rfc9002.html
  11. RFC 7838 - Alternative Services - https://www.rfc-editor.org/rfc/rfc7838.html
  12. RFC 9460 - Service Binding and HTTPS DNS Resource Records - https://www.rfc-editor.org/rfc/rfc9460.html
  13. RFC 9651 - Structured Field Values for - https://www.rfc-editor.org/rfc/rfc9651.html
  14. RFC 7301 - TLS Application-Layer Protocol Negotiation - https://www.rfc-editor.org/rfc/rfc7301.html
  15. RFC 9308 - Applicability of the Transport Protocol - https://www.rfc-editor.org/rfc/rfc9308.html
  16. RFC 9312 - Manageability of the Transport Protocol - https://www.rfc-editor.org/rfc/rfc9312.html
  17. IANA Field Name Registry - https://www.iana.org/assignments/ -fields/ -fields.xhtml
  18. IANA Status Code Registry - https://www.iana.org/assignments/ -status-codes/ -status-codes.xhtml
  19. Axway - Configure services - https://docs.axway.com/bundle/axway-open-docs/page/docs/apim_policydev/apigw_gw_instances/general_services/index.html
  20. Axway - Configure remote host settings - https://docs.axway.com/bundle/axway-open-docs/page/docs/apim_policydev/apigw_gw_instances/general_remote_hosts/index.html
  21. Microsoft - API gateway in Azure API Management - https://learn.microsoft.com/en-us/azure/api-management/api-management-gateways-overview
  22. Microsoft - forward-request policy - https://learn.microsoft.com/en-us/azure/api-management/forward-request-policy
  23. Microsoft - Manage protocols and ciphers in API Management - https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-manage-protocols-ciphers

Suggested reading order

  1. Read the introductory sections and terminology of RFC 9110 before studying specific versions.
  2. Study RFC 9112 with a focus on message , connection and parsing security.
  3. Read the overview, frames, streams, and errors of RFC 9113; consult in parallel.
  4. Study in the connection, streams, and migration sections of RFC 9000, followed by TLS integration in RFC 9001.
  5. Read RFC 9114 and , relating what was delegated to .
  6. Consult and HTTPS/SVCB to understand discovery and fallback.
  7. Finally, map the capabilities and limitations of the version of Axway and Azure APIM used in the work.

Closing

Mastering means mastering the boundary between business intent and transport. The next chapter will delve deeper into HTTPS and TLS, explaining how identity, confidentiality, and integrity protect each of these connections.