What you’ll take away : Gateway applies your policies in a precise order between builders (DNS, then Network, then HTTP since July 2025) and by precedence inside each builder (first match wins, lower number = higher priority). Understanding this order avoids the classic trap: a rule that blocks where you did not expect it.
Current state: order between builders
Gateway evaluates DNS policies first (global DNS/resolver policies before everything), then Network (L4), then HTTP (L7). This order changed on 14 July 2025: HTTP used to run before Network. For proxied HTTP/3 traffic the order is also DNS → Network → HTTP.
Inside a builder, precedence decides: the first matching policy wins, and a lower order number is evaluated earlier. For HTTP, Do Not Inspect and Isolate policies are always evaluated before Allow/Block.
Trade-offs
- Power vs surprise: independent L4 and L7 layers give fine control, but a rule in one layer can cancel the visible effect of another.
- Specificity: you must discipline order numbers (specific before general), or a broad Block hides a precise Allow.
Failure modes (what breaks quietly)
- Vanishing block page: since July 2025 a silent Network block applies before an HTTP block-with-page — the user no longer sees the page and assumes an outage.
- Broad Block above a specific Allow: order numbers inverted, and the exception never applies.
- Forgetting Do Not Inspect: to exempt a site from TLS inspection you need a Do Not Inspect policy — a plain Allow is not enough.
Proving the negative
- Reproduce with a test domain and read Gateway logs: which builder decided?
- Verify a specific exception has a lower order number than the general Block.
- Confirm a Network block meant to be visible carries a client notification.
- Drive precedence via Terraform (
precedencefield, lower = higher priority).
Takeaway
Most Gateway “bugs” are ordering problems, not rule problems. Remember the DNS → Network → HTTP chain, first-match-wins, and always place the specific before the general.
A question or some feedback? Reach me on LinkedIn: Mokrane Assam.