10 min read

The Speed of Trust: Engineering Sub-Millisecond Policy Propagation for 100M+ RPS Global Meshes

Sub-Millisecond Trust for 100M+ RPS Meshes

The Speed of Trust: Engineering Sub-Millisecond Policy Propagation for 100M+ RPS Global Meshes

Imagine this: It’s 2:00 PM on a Friday. Your global infrastructure is humming along at 120 million requests per second (RPS). Suddenly, your security operations center (SOC) detects a credential leak from a high-privilege service in the us-east-1 region. To mitigate the threat, you need to revoke its identity and deny all its ingress/egress traffic—not just in Virginia, but across your clusters in Tokyo, Frankfurt, and Sao Paulo.

In a traditional architecture, this “emergency brake” might take 30 seconds, a minute, or even five to propagate through various CI/CD pipelines and Kubernetes API servers. In the world of high-frequency trading, global fintech, or massive-scale social platforms, sixty seconds is an eternity. It’s long enough for an attacker to exfiltrate terabytes of data or poison a global cache.

At this scale, the “Zero Trust” buzzword stops being a marketing slide and starts being a brutal engineering constraint. How do you design a system where security policies travel faster than the blink of an eye across a global footprint, while the data plane processes 100M+ requests without breaking a sweat?

Let’s go under the hood of building a zero-trust cross-region service mesh overlay designed for the “Impossible Scale.”


The Physics of the Problem: Why Standard Meshes Fail

Most off-the-shelf service meshes (think vanilla Istio or Linkerd) were designed for clusters, not continents. When you try to stretch them across 50 regions to handle 100M+ RPS, you hit three walls:

  1. The XDS Bloat: The control plane protocol (often Envoy’s XDS) becomes a victim of its own success. As the number of endpoints grows, the configuration sent to every sidecar proxy balloons. We’ve seen configurations reach 50MB+ in size. Pushing a 50MB JSON blob to 100,000 proxies every time a single endpoint changes is a recipe for a 10-minute propagation delay.
  2. TCP Head-of-Line Blocking: Standard control planes often rely on long-lived gRPC streams over TCP. If a single packet drops on a cross-region link, the entire update stream stalls.
  3. The Observability Tax: At 100M RPS, even a 1% telemetry sampling rate generates 1 million spans per second. The “mesh overhead” suddenly starts costing more in compute than the actual business logic.

To achieve sub-millisecond local propagation and near-speed-of-light global propagation, we have to rethink the stack from the hardware up.


The Architecture: A Three-Tiered Distributed Control Plane

To solve the propagation problem, we move away from a monolithic “Global Control Plane” toward a federated, tiered architecture. We categorize the architecture into three distinct layers:

1. The Global Policy Engine (The Source of Truth)

This is where the intent is defined. We use a GitOps-driven OPA (Open Policy Agent) model. However, instead of pushing raw YAML, we compile policies into WebAssembly (WASM) modules or eBPF bytecode.

Why WASM? Because it allows us to ship complex logic—like “Reject if user.claims.level < 5”—as a pre-compiled, highly efficient binary that the data plane can execute in nanoseconds without calling back to a central server.

2. Regional Relays (The Fan-out Layer)

Each region has a cluster of “Relay Controllers.” These aren’t just proxies; they are state-consistent caches using a Conflict-free Replicated Data Type (CRDT) backbone.

  • The Innovation: Instead of gRPC over TCP, we use a custom QUIC-based transport for inter-region communication. QUIC’s multi-streaming prevents a packet loss in “Policy A” from delaying “Policy B.”

3. Local Mesh Agents (The Enforcers)

On every node, a lightweight agent sits in the kernel-space (via eBPF) and the user-space (via a sidecarless proxy). This agent watches a local shared-memory segment for policy updates.


Achieving Sub-Millisecond Propagation: The “Hot-Path”

The goal is to get a policy change from the Regional Relay to the Data Plane enforcer in < 1ms. Here is how we bypass the traditional bottlenecks:

Zero-Copy Shared Memory

Traditional sidecars receive updates over a Unix Domain Socket, parse the JSON, and update their internal state. This is too slow for 100M RPS. Instead, our local agent writes the updated policy into a lock-free Concurrent Hash Map located in a shared memory segment (POSIX SHM). The data plane proxies (Envoy or a custom eBPF loader) poll this memory segment. There is no context switching, no socket overhead, and no serialization. It’s a direct memory read.

Delta-XDS and Binary Encoding

We stopped sending the full state. We use a Binary Delta Encoding where we only send the “diff” of the policy. If a single IP is blacklisted, we don’t resend the 5,000-line ACL; we send a 40-byte binary update.

// A conceptual snippet of our high-speed delta update
message PolicyUpdate {
  uint64 policy_id = 1;
  enum Action { ADD = 0; REMOVE = 1; UPDATE = 2; }
  Action action = 2;
  bytes eBPF_bytecode = 3; // The logic itself
  fixed64 timestamp_ns = 4; // For CRDT ordering
}

The Data Plane: Sidecarless eBPF vs. Optimized Envoy

At 100M RPS, the “Sidecar Tax” (the latency added by jumping from the application to the proxy and back) becomes the primary bottleneck. At this scale, every microsecond is worth millions of dollars in infrastructure costs.

The eBPF Fast-Path

For L3/L4 policies (IP white-listing, mTLS handshake offloading), we move the enforcement entirely into the Linux Kernel using eBPF. When a packet hits the NIC, an eBPF program (XDP) inspects it. If the policy in our shared memory says “Drop,” the packet is discarded before it even hits the TCP/IP stack.

This allows us to handle DDoS-level events or global revocations at the line rate of the network card (100Gbps+).

L7 Wisdom with WASM

For L7 logic (JWT validation, header-based routing, rate limiting), eBPF is too restrictive. Here, we use a “Sidecarless” approach (similar to Istio’s Ambient Mesh but tuned for performance). We use a per-node Z-Proxy (Zero-Trust Proxy).

  • WASM Execution: We compile OPA Rego policies into WASM. When the Z-Proxy receives a request, it executes the WASM module.
  • Pre-computed Results: For the most frequent requests at 100M RPS, we cache policy decisions in a thread-local LRU cache. If the same identity calls the same service with the same scope, the decision is a 5ns cache lookup.

Solving for Global Consistency (The CAP Theorem Struggle)

When you are operating across 50+ regions, you cannot have “Strong Consistency” and “High Availability” simultaneously during a network partition.

In a Zero-Trust environment, Availability is mandatory, but Security is non-negotiable.

We chose “Fail-Closed” Eventual Consistency with CRDTs.

  1. State Synchronization: We use a Gossip Protocol (based on HashiCorp’s memberlist but optimized for 100k nodes) to spread policy versions.
  2. Conflict Resolution: If two admins update a policy simultaneously in different regions, the CRDT ensures that every node in the world eventually converges to the same state without a central coordinator.
  3. The “Safety Gap”: To handle the “sub-millisecond” requirement, we use a versioned policy approach. A request is tagged with a policy_version_id. If a proxy receives a request with a version newer than it currently has, it can trigger an “Urgent Pull” or temporarily hold the request for a few microseconds to synchronize.

Zero-Trust at Scale: Identity is the Perimeter

At 100M RPS, you can’t rely on IP addresses. IPs are ephemeral and meaningless in a dynamic mesh. Identity must be cryptographic.

SPIFFE/SPIRE at Warp Speed

We use SPIFFE (Secure Production Identity Framework for Everyone) to issue SVIDs (Short-lived X.509 certificates) to every workload.

  • The Challenge: Issuing and rotating certificates for 1 million pods every hour.
  • The Solution: We moved the SVID rotation to the local node agent. The agent handles the CSR (Certificate Signing Request) locally, and the Regional Relay acts as an intermediate CA. This prevents a “thundering herd” effect on the Global Root CA.

mTLS Without the Handshake Overhead

Traditional mTLS requires a full handshake for every new connection. At high RPS, the CPU cost of RSA/ECC handshakes is staggering.

  • TLS Session Resumption: We heavily utilize TLS 1.3 with PSK (Pre-Shared Key) resumption.
  • Hardware Acceleration: We offload the AES-GCM encryption to AES-NI instructions on the CPU or dedicated SmartNICs (DPUs). This reduces the latency of encryption from microseconds to nanoseconds.

The “Hype” vs. The Reality: Is eBPF the Silver Bullet?

There is currently massive hype around “Sidecarless Mesh” and “eBPF-powered networking.” You’ll hear vendors claim it solves everything. The reality is more nuanced.

The Hype: “eBPF replaces the proxy.” The Reality: eBPF is great for simple “allow/deny” and “routing.” But it is a nightmare for complex L7 protocols (like parsing SOAP, complex gRPC, or heavy body inspection).

Our architecture uses a Hybrid Approach:

  • eBPF for the “Fast Path” (mTLS offload, L4 security, Telemetry collection).
  • WASM + Envoy for the “Deep Path” (Complex Authorization, Request Transformation).

This hybrid approach is what allows us to hit 100M RPS. If we did everything in Envoy, the compute cost would be astronomical. If we did everything in eBPF, the engineering complexity would make the system unmaintainable.


Monitoring the Unmonitorable: 100M RPS Observability

How do you know your sub-millisecond policy actually propagated? You can’t log every request.

1. In-Kernel Aggregation

Instead of sending every “Policy Denied” event to a central collector, we use eBPF Maps to aggregate counters in the kernel.

  • Map: {Policy_ID, Action, Count}
  • Every 1 second, the agent reads the map and ships the summary to Prometheus/VictoriaMetrics.

2. Adaptive Sampling

We use Head-based Adaptive Sampling. If a request is “Denied,” we sample it at 100% to understand why. If it is “Allowed” and part of a steady-state traffic pattern, we sample it at 0.001%.

3. Verification Probes (The “Trust but Verify” Loop)

We run “Sentinel” pods in every region. These pods constantly attempt to perform actions that should be blocked. If a Sentinel pod in Sydney can suddenly reach a service it’s supposed to be blocked from, an alert triggers globally within 500ms. This is our “Control Plane Heartbeat.”


Engineering for Failure: The “Blast Radius” Protocol

At this scale, you don’t ask if a region will go dark, but when.

If the connection between us-west and the Global Policy Engine is severed:

  1. Local Persistence: Every node agent persists the last known good policy to a local RocksDB instance.
  2. Autonomous Operation: The region continues to enforce the last known security state.
  3. The “Stale State” Hazard: We implement a “TTL on Authority.” If a node hasn’t heard from the control plane in 30 minutes, it can be configured to “Force Revoke” high-risk credentials, entering a High-Security Lockdown Mode.

The Result: Security as a Competitive Advantage

By shifting from a centralized, TCP-based mesh to a decentralized, eBPF-and-QUIC-powered overlay, we transform security from a “latency tax” into a transparent fabric.

The Stats:

  • Global Policy Propagation: ~150ms (limited by the speed of light across the Pacific).
  • Regional Policy Propagation: < 1ms (from Relay to Data Plane).
  • Data Plane Latency: < 10 microseconds overhead per request.
  • Scale: Tested up to 150M RPS across 12 cloud regions.

Designing for 100M RPS isn’t about finding a faster proxy; it’s about eliminating the friction between intent and enforcement. By leveraging the kernel via eBPF, the efficiency of WASM, and the resilience of CRDTs, we can build a world where “Zero Trust” is not just a policy, but a physical property of the network.

The future of the service mesh isn’t a sidecar; it’s an invisible, intelligent substrate that moves as fast as the code it protects.


More to explore

Keep diving in