Architectural Invariant Design: Envoy Gateway Stateless eBPF NAT64 Dual-Stack Ingress Standard
Envoy Gateway Stateless eBPF NAT64 Dual-Stack Ingress Standard defines an industrial-grade behavioral standard for devops engineering. Enforces deterministic, stateless RFC 6052 / RFC 7915 algorithmic IPv6-to-IPv4 header synthesis via eBPF XDP programs at Envoy Gateway edge nodes. Eliminates netfilter conntrack exhaustion and dual-stack core routing complexity by mapping IPv4 targets into the Well-Known 64:ff9b::/96 prefix prior to envoy listener processing, guaranteeing O(1) memory consumption and linear scaling. Modern software architectures require strict adherence to deterministic patterns to guarantee high availability, maintainability, and zero security vulnerabilities.
Hazard Analysis: What Breaks Without This Rule
The following failure modes have been cataloged from hundreds of hours of production code reviews where AI assistants produced non-compliant implementations:
| Failure Mode | AI Symptom (The Anti-Pattern) | Severity | Production Impact & Remedy |
|---|---|---|---|
| AI Hallucination & Deprecation Drift | Stateful Netfilter Conntrack NAT64 and Complex Internal Dual-Stack Routing Under Ingress Load | Critical | Violating this industrial standard introduces regression bugs, security risks, and unexpected runtime failures in production. Enforce explicit behavioral system directives across all AI coding assistants in your repository. |
| Silent Architecture Inconsistency | AI assistants produce mixed paradigms across files, creating fragmented codebase conventions. | Medium | Increases cognitive load during code reviews and leads to maintenance debt across engineering teams. Pin project conventions in .cursor/rules, CLAUDE.md, and AGENTS.md so all team agents follow identical guardrails. |
Step-by-Step Production Directives
Each rule constraint below is injected into the AI agent's system prompt to establish deterministic boundaries:
Engineers MUST ALWAYS configure XDP eBPF hook programs on external ingress interfaces to statelessly translate IPv6 packets to IPv4 using RFC 6052 Well-Known (64
Engineers MUST ALWAYS configure XDP eBPF hook programs on external ingress interfaces to statelessly translate IPv6 packets to IPv4 using RFC 6052 Well-Known (64:ff9b::/96) or Network-Specific prefixes.
Engineers MUST NOT rely on Linux netfilter, iptables, or nftables stateful NAT (MASQUERADE, SNAT/DNAT conntrack modules) for cluster ingress NAT64 translation.
Engineers MUST NOT rely on Linux netfilter, iptables, or nftables stateful NAT (MASQUERADE, SNAT/DNAT conntrack modules) for cluster ingress NAT64 translation.
Engineers MUST ensure cluster mesh and internal pod networks remain single-stack (IPv6-only or pure IPv4) rather than dual-stack, delegating all translation boundaries strictly to Envoy Gateway eBPF edge programs.
Engineers MUST ensure cluster mesh and internal pod networks remain single-stack (IPv6-only or pure IPv4) rather than dual-stack, delegating all translation boundaries strictly to Envoy Gateway eBPF edge programs.
XDP translation programs MUST recalculate L3 IPv4 checksums using incremental updates (RFC 1624) and handle TCP/UDP pseudo-header checksum differential adjustments statelessly without keeping flow-state memory tables.
XDP translation programs MUST recalculate L3 IPv4 checksums using incremental updates (RFC 1624) and handle TCP/UDP pseudo-header checksum differential adjustments statelessly without keeping flow-state memory tables.
EnvoyProxy Custom Resources MUST explicitly bind to the translated address space and preserve original client IP metadata by attaching PROXY protocol v2 headers or X-Forwarded-For via Envoy's downstream proxy filter chain.
EnvoyProxy Custom Resources MUST explicitly bind to the translated address space and preserve original client IP metadata by attaching PROXY protocol v2 headers or X-Forwarded-For via Envoy's downstream proxy filter chain.
Non-translatable packets (such as IPv6 fragments where total size exceeds IPv4 MTU minus 20 bytes) MUST generate stateless ICMPv6 Type 2 (Packet Too Big) responses directly within the eBPF layer.
Non-translatable packets (such as IPv6 fragments where total size exceeds IPv4 MTU minus 20 bytes) MUST generate stateless ICMPv6 Type 2 (Packet Too Big) responses directly within the eBPF layer.
Frequently Asked Technical Questions
Common questions developers face when configuring AI coding assistants for this stack:
Q:Why is Envoy Gateway Stateless eBPF NAT64 Dual-Stack Ingress Standard critical for AI coding assistants?
Enforces deterministic, stateless RFC 6052 / RFC 7915 algorithmic IPv6-to-IPv4 header synthesis via eBPF XDP programs at Envoy Gateway edge nodes. Eliminates netfilter conntrack exhaustion and dual-stack core routing complexity by mapping IPv4 targets into the Well-Known 64:ff9b::/96 prefix prior to envoy listener processing, guaranteeing O(1) memory consumption and linear scaling. Without explicit behavioral boundaries, AI coding assistants (Cursor, Claude Code, Windsurf, Codex) rely on training data averages, which frequently produce deprecated, inefficient, or vulnerable code patterns.
Q:How does adopting this rule prevent AI hallucinations?
This rule explicitly declares what the AI must avoid (Stateful Netfilter Conntrack NAT64 and Complex Internal Dual-Stack Routing Under Ingress Load) and prescribes verified positive examples. Grounding the LLM with negative and positive pairs eliminates guesswork.
Q:Which AI coding environments are supported?
This specification is multi-platform compatible: Cursor (.cursor/rules/*.mdc & .cursorrules), Anthropic Claude Code (CLAUDE.md), Windsurf (.windsurfrules), Codex / Cline (AGENTS.md), and GitHub Copilot (.github/copilot-instructions.md).
Q:Can I combine this rule with other technology stacks?
Yes. Use the Interactive Stack Builder or download an Agent Pack to merge this rule with other frontend, backend, database, security, and DevOps rules without syntax collision.