Semantics, messages, connections, multiplexing, and QUIC in API architectures
In-depth edition — professional study and reference material
By João Ricardo Dutra••Full material
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.
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.
Block
Content
Guiding question
A
HTTP Semantics
What does the message mean regardless of version?
B
HTTP/1.1
How are textual messages delimited within a TCP stream?
C
HTTP/2
How do frames and streams efficiently share a connection?
D
HTTP/3 and QUIC
How to reduce blockages and make connection, security and mobility part of transportation?
And
Gateways and operation
How 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.
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.
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.
Figure 3 - Conceptual anatomy of request and response.
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.
Component
Example
Technical use
scheme
https
Defines security schema and expectations.
Authority
api.example.com:443
Identifies host and logical port of the source.
Path
/v1/accounts/123
Selects resource or route.
Query
view=summary
Non-hierarchical parameters.
Fragment
#section
It 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.
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.
Code
Operational meaning
Point of attention in gateways
200
Operation completed with representation.
It can be cached according to fields and method.
201
Resource created.
Location can identify the new resource.
204
Success without content.
Do not invent a body during transformation.
304
Stored representation remains valid.
It's not a normal body response.
400
Invalid request.
It can come from parsing, validation or contract.
401
Missing or invalid credentials.
WWW-Authenticate describes the challenge.
403
Entity understood but not authorized.
Not to be confused with authentication failure.
404
Resource not found or hidden.
It could come from gateway routing.
409
Conflict with current state.
Useful in competition and idempotence.
413
Content too big.
Limit may exist in each intermediary.
429
Limit exceeded.
Retry-After can guide retry.
502
Invalid response from upstream.
Investigate connection and parsing between gateway and backend.
503
Service unavailable.
Empty pool, maintenance or overload.
504
Gateway 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.
Category
Examples
Function
Routing and targeting
Host, Forwarded
Identify authority and path through intermediaries.
Representation
Content-Type, Content-Encoding, Content-Language
Describe the transferred content.
Negotiation
Accept, Accept-Encoding, Accept-Language
Express customer preferences.
Cache
Cache-Control, Age, ETag, Vary
Control storage and reuse.
Authentication
Authorization, WWW-Authenticate
Present credential or challenge.
Condition
If-Match, If-None-Match, If-Modified-Since
Execute operation according to known state.
Observability
traceparent, tracestate, correlation
Propagate 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.
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.
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.
-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.
Figure 6 - Two common ways to delimit in /1.1.
Table 5 - Length determination in HTTP/1.1.
Situation
How length is determined
Note
Reply to HEAD
No content
Fields can describe an equivalent GET.
1xx, 204, 304
No content
Framing should not invent bodysuits.
CONNECT 2xx
Tunnel after headers
Following bytes are not ordinary HTTP messages.
Chunked Final Transfer-Encoding
Chunks down to size zero
Trailers can follow chunk zero.
Valid Content-Length
Exact number of octets
Conflicting values are an error.
Response without explicit framing
Until connection closes
Not 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.
Parameter
What limits
Symptom when inappropriate
Connect timeout
TCP/TLS establishment upstream
Fail quickly or wait too long before sending.
Read/response timeout
Waiting for response or data
504 even when backend completes later.
Idle timeout
Time without traffic on reusable connection
RST when reusing connection terminated by another hop.
Max lifetime
Total connection life
Helps renew DNS and distribute connections.
Pool size
Concurrent connections by destination
Local queue, latency or excess sockets.
Total request timeout
Operation budget
It 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.
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.
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.
Figure 9 - Frames from multiple streams sharing an /2 connection.
Table 7 - Important HTTP/2 frames.
Frame
Scope
Purpose
DATE
Stream
Message content and possible END STREAM.
HEADERS
Stream
Starter block or compressed trailers.
SETTINGS
Connection
Directional parameters and capabilities.
WINDOW UPDATE
Connection or stream
Increase flow control credit.
RST STREAM
Stream
Abort specific operation.
PING
Connection
Measure liveness/RTT without HTTP semantics.
GOAWAY
Connection
Stop new streams and drain existing ones.
PRIORITY UPDATE
Stream
Signal 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.
Event
Effect
Operational decision
END STREAM in request
Customer finished content.
Gateway can initiate full processing or streaming.
END STREAM in response
Server finished message.
Stream may close if both directions have ended.
RST STREAM
Cancels specific stream.
Register launcher and code; business effect may already exist.
GOAWAY NO ERROR
Coordinated drainage.
Open new connection for new streams.
GOAWAY with error
Connection failure.
Evaluate retries by stream and idempotence.
Stream limit
New 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.
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.
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.
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.
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.
Phase
Protection/property
Operational risk
Initial
Derivable keys to enable routing and handshake initiation.
Not to be confused with lack of integrity; content is not strong secret against observer.
Handshake
TLS authenticates and negotiates final keys.
Loss or blocking of UDP appears as failure before HTTP.
1-RTT
Normal data protected.
Active streams and flow control.
0-RTT
Early data in resumption.
Possible replay; restrict operations.
Retry
Additional 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 .
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.
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 element
Transport
Usage
Request stream
Customer-initiated bidirectional QUIC
A request and its response.
Control stream
Unidirectional QUIC per endpoint
SETTINGS, GOAWAY and HTTP control.
QPACK encoder stream
Unidirectional QUIC
Pivot table updates.
QPACK stream decoder
Unidirectional QUIC
Confirmations and cancellations.
HEADERS
Frame HTTP/3
Starting pitches or trailers.
DATE
Frame HTTP/3
Message 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.
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.
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.
Appearance
HTTP/1.1
HTTP/2
HTTP/3
Transport
TCP; Separate TLS over HTTPS
TCP; typically TLS + ALPN
QUIC over UDP; Integrated TLS 1.3
Format
Lines and textual fields
Binary frames
Frames over QUIC streams
Competition
Sequential/pipeline; multiple connections
Multiplexed streams
Loss-isolated multiplexed streams
Field compression
Not standardized in the protocol
HPACK
QPACK
HOL
On HTTP and TCP
Eliminates HOL HTTP; keeps TCP HOL
Loss blocks only affected stream
Network migration
Connection often breaks
Connection often breaks
Connection IDs and path validation
Passive Observability
Simpler after TLS termination
Frames after TLS termination
More encrypted control; requires QUIC terminator
Compatibility
Maximum
Broad on modern browsers/proxies
Depends 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.
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.
Checkpoint
Evidence
Question
HTTP service/listener
Port, TLS and protocol configuration
What does the client negotiate with the gateway?
Policy flow
Trace filters and transformations
What fields and content have changed?
Routing/remote host
Target, version, pool and timeout
How does the gateway create the upstream connection?
Access log
status, bytes, times, correlation
Who produced the response and how long did it take?
Backend log
protocol and authority observed
What 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 Element
HTTP Impact
Validation
Gateway Protocols
Inbound and TLS capabilities
Check configuration and tier.
forward-request
Version and timeout from jump to backend
Confirm support of the gateway used.
Retry policy
Can repeat call after failure
Classify method and idempotence.
set-header/rewrite-uri
Change forwarded message
Compare trace with backend log.
Cache policies
Can respond without upstream
Validate key, TTL and privacy.
Diagnostics and telemetry
Distinguish policy, gateway and backend
Propagate 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.
Metric
HTTP/1.1
HTTP/2
HTTP/3
Competition Unit
Connection/request
Stream
Stream QUIC
Coordinated closure
Connection: close / FIN
GOAWAY + streams
GOAWAY + QUIC closure
Cancellation
Closing connection may affect other calls
RST STREAM
Reset/stop-sending per stream
Field compression
N/A at core
HPACK errors
QPACK errors and blocks
fallback signal
New connection in another version
ALPN http/1.1
QUIC failure followed by H2/H1
Relevant loss
TCP retransmission
TCP retransmission affects streams
Path/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.
Raw request in laboratory, policy trace, backend log.
413/431
Limit content or fields in some jump
Settings and uncompressed actual size.
502
Upstream failure/invalidity, reset, protocol
Internal gateway error, backend capture and log.
503 flashing
Pool, health, stream/connection limit, deploy
Metrics per instance and connection.
504
Gateway-backend hop timeout or chain
Latency breakdown and timeout budget.
H2 works, H1 fails
Framing, Trailers, Competition or Host
Comparison of the message after translation.
H3 slow before working
QUIC attempt fails and fallback
UDP/443, Alt-Svc/HTTPS RR and QUIC logs.
RST in reuse
Idle timeout misaligned
Connection age and closure on the other hop.
Duplicity after timeout
Non-idempotent operation retry
Attempt 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.
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.
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 .
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.
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”.
Register client-edge protocol.
Register edge-gateway protocol.
Register gateway-backend protocol.
Compare Host/: and Forwarded fields.
Execute call with large and observe buffering.
Run controlled deploy and observe draining/ or resets.
Architecture Checklist for Enterprise APIs
Table 16 - Design and review checklist.
Theme
Review Questions
Semantics
Do methods and statuses follow their properties? Do retries respect idempotence?
URI/authority
Are host and original authority validated and preserved when necessary?
Fields
Which ones are removed, created, signed, or trusted at each hop?
Content
Is there transformation, compression, buffering, streaming or uncompressed limit?
Cache
What responses can be stored? Does the key consider identity and Vary?
HTTP/1.1
Is framing strict? Are pools and idle timeouts coordinated?
HTTP/2
What stream, field and window limits are configured? Is GOAWAY treated?
HTTP/3
Is UDP allowed? Is there fallback? How are qlog and QUIC metrics collected?
Gateway
Have inbound/outbound versions been confirmed by evidence?
Observability
Are public status, upstream status and internal error separate?
Security
Have protocol translations been tested against ambiguities and smuggling?
Capacity
Is 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
Explain the difference between semantics and specific version mapping.
Why doesn't stateless mean that an application cannot maintain a session?
Differentiate resource, , and .
Which components of a URI participate in an request and which are not sent?
Differentiate secure method from idempotent method and give examples.
Why repeating POST after timeout can produce duplicity even when the client received 504?
Who can create a 502 on a chain with multiple proxies?
Why should reason phrase not be used in client logic?
Differentiate -Type, -Encoding and Transfer-Encoding.
Explain why is necessary in caching .
What does `Cache-Control: no-cache` mean?
How do and If-Match help avoid lost update?
Why doesn't TCP preserve message boundaries?
What risks exist when -Length and Transfer-Encoding are interpreted differently?
Why can a persistent connection only be reused after completely consuming the previous message?
Describe head-of-line in /1 pipelining.
How does /2 map a request to frames and streams?
Differentiate between /2 and TCP congestion control.
What is the role of SETTINGS_MAX_CONCURRENT_STREAMS?
How does help with deployments and draining?
How does reduce overhead and why does it create per-connection state?
What is the role of in /2 negotiation?
Why is /2 still subject to TCP head-of-line?
Why is stating that is “UDP untrusted” wrong?
How does enable path migration?
What is the risk of 0-RTT for effect trades?
How does differ conceptually from ?
How can advertise without changing the logical ?
Why can an API use publicly and /1.1 in the backend?
What additional metrics are needed in /2 and ?
Propose a timeout budget for client, edge, gateway and backend.
Design a secure retry strategy for payment GET and POST.
Explain how an H2 to H1 translation can create a risk of .
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.
Term
Definition
ALPN
TLS extension used to negotiate the application protocol, such as h2 or http/1.1.
Alt-Svc
Mechanism for advertising alternative HTTP service, including HTTP/3 endpoint.
Authority
Component that identifies the host and logical port of the source.
Shared cache
Cache that can reuse responses for more than one user or client.
Connection coalescing
Controlled reuse of an HTTP/2 connection to more than one origin.
Connection ID
QUIC identifier that allows you to associate packets with the connection beyond the IP/port tuple.
Content
Message data sequence after appropriate framing decodes.
Content negotiation
Selection of representation according to preferences and capabilities.
Control stream
Unidirectional HTTP/3 stream that carries connection control.
End-to-end field
Field whose meaning applies to final endpoints, even through intermediaries.
ETag
Opaque validator associated with a representation.
Flow control
Mechanism that prevents the sender from exceeding buffers announced by the receiver.
Framing
Rules for determining limits and content of messages in transport.
GOAWAY
Signal that a connection will not accept new streams/requests beyond a certain limit.
HEADERS frame
Frame that transports compressed block of fields in HTTP/2 or HTTP/3.
Head-of-line blocking
Delay in independent operations caused by a missing or slow previous item.
HPACK
Field compression used by HTTP/2.
HTTP/3
Mapping HTTP semantics to QUIC.
Idempotence
Property by which repeating the same intention produces the same intended effect.
Intermediate
HTTP participant that receives and forwards messages, such as a proxy or gateway.
Multiplexing
Sharing a connection across multiple independent exchanges.
Origin
Logical source responsible for the resource identified by the URI.
Pseudo-header
Special HTTP/2/3 field starting with a colon, such as :method.
QPACK
Field compression used by HTTP/3.
QUIC
Secure, multiplexed transport over UDP used by HTTP/3.
Representation
Data and metadata that represents the state of a resource.
Request smuggling
Attack based on divergence on request limits between intermediaries.
Safe method
Method whose intention is essentially reading.
Stream
Logical and ordered channel within a multiplexed connection.
Trailer
Field sent after the message content.
Validator
Metadata used to test whether the stored representation remains valid.
Vary
Field that informs dimensions of the request used to select a response.
Official references and recommended reading
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.
Microsoft - API gateway in Azure API Management - https://learn.microsoft.com/en-us/azure/api-management/api-management-gateways-overview
Microsoft - forward-request policy - https://learn.microsoft.com/en-us/azure/api-management/forward-request-policy
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
Read the introductory sections and terminology of RFC 9110 before studying specific versions.
Study RFC 9112 with a focus on message , connection and parsing security.
Read the overview, frames, streams, and errors of RFC 9113; consult in parallel.
Study in the connection, streams, and migration sections of RFC 9000, followed by TLS integration in RFC 9001.
Read RFC 9114 and , relating what was delegated to .
Consult and HTTPS/SVCB to understand discovery and fallback.
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.