The same prompt, two edges
Lab demonstration with synthetic data only. Not production code and not a statement about any customer's configuration.
AWS WAF can only look at the first part of a request body. On an Application Load Balancer that window is fixed at 8 KB (8,192 bytes). On Amazon CloudFront it is 16 KB by default and can be raised to 64 KB. This page sends one test prompt, with a marker string placed at a position you choose, to both edges and shows what each one saw.
The marker is a harmless test string. A WAF rule on the body matches it only if it sits inside the inspected window.
Engineer view
(nothing sent yet)
Recorded results
Measured in the lab (whole HTTP body counts, JSON wrapper included). The marker is 8 bytes long; "boundary" is the last byte the WAF could still see.
| Edge | Body inspection window | Measured boundary |
|---|---|---|
| ALB + WAF | fixed, 8 KB | 8,192 bytes |
| CloudFront + WAF, 16 KB setting | 16 KB | 16,384 bytes |
| CloudFront + WAF, 32 KB setting | 32 KB | 32,768 bytes |
| CloudFront + WAF, 48 KB setting | 48 KB | 49,152 bytes |
| CloudFront + WAF, 64 KB setting | 64 KB | 65,536 bytes |
Client certificates and long streams
Browsers cannot easily present client certificates, so these are shown as commands with the results recorded in the lab.
Mutual TLS on an ALB listener
curl --cert client.crt --key client.key https://API_HOST/whoami # trusted certificate: 200 curl https://API_HOST/whoami # no certificate on a verify-mode listener: connection reset
Recorded: with verify mode on a listener shared by an API host and a dashboard host, clients without a certificate are refused on both hosts.
Server-sent events through CloudFront
curl -N "https://API_HOST/v1/stream?gap_ms=130000&tokens=3&heartbeat_ms=15000"
Recorded: with a 120 second origin response timeout, a gap longer than the timeout is cut; periodic SSE comment lines keep the stream open.