Go Envoy
You build a go envoy setup by running a control plane or custom filter in Go. This setup sends routing rules to your data plane instances in real time. Platform teams use this pattern to direct traffic between internal apps. Still, teams often give the control plane broad permissions across all network clusters. Broad permissions let one bad update break routing for every service at once. How a go envoy architecture works in production Envoy runs as a fast network engine written in C++. Most
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You build a go envoy setup by running a control plane or custom filter in Go. This setup sends routing rules to your data plane instances in real time. Platform teams use this pattern to direct traffic between internal apps. Still, teams often give the control plane broad permissions across all network clusters. Broad permissions let one bad update break routing for every service at once.
How a go envoy architecture works in production
Envoy runs as a fast network engine written in C++. Most teams do not write static text files to set up their routes. Instead, they write a control plane app in Go using the official discovery service API. This Go app watches your container scheduler and finds new service addresses.
When a new app starts, the Go server builds a fresh snapshot of routing rules. It then pushes this snapshot to every running network instance over a persistent stream. The network instances apply the new rules right away without dropping active traffic.
Teams also use Go to write custom network filters for their traffic. A developer compiles the Go filter into a shared library or a WebAssembly module. The main network engine loads this module and runs the custom Go logic on each request. This lets teams check headers, block bad traffic, or add custom trace tags in Go.
Managing permissions and state in your Go control plane
Your Go control plane needs permission to read cluster state from your container scheduler. You must create a service role that only reads endpoint lists and network rules. Many teams make the mistake of giving this role full cluster admin rights.
If an attacker compromises the Go server, full admin rights let them control every workload. You should scope the service role down to specific namespaces and read-only actions. You also need mutual TLS between the Go control plane and the network instances. Mutual TLS makes sure only trusted servers can push new routing rules to your fleet.
Envoy Proxy Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
State management is another common pain point when you run a custom Go control plane. If the Go server sends broken rules, every instance might reject the update at once. Your team must check rule syntax before the Go server pushes a new snapshot out.
What native network routing solves and what it misses
A custom Go control plane solves service discovery and service-to-service traffic routing very well. It makes sure that Service A can find and talk to Service B using TLS. It also lets you split traffic during deploys and block unauthorized services from talking.
Still, this network setup only decides which services or users can open a network channel. It does not inspect what engineers or apps do inside a database session or host shell. Once the network route allows a connection, the user has full access to run any query. Native service routing cannot mask phone numbers or card numbers in database query results. It also cannot pause a risky database drop command for a human peer review.
Inspect internal HTTP API calls and JSON responses in flight
Service auth and ingress rules decide who connects to an API. They do not rewrite sensitive fields in JSON responses or hold a risky request for human review. By design, hoop.dev is an open-source proxy that runs beside your service as a sidecar for your HTTP API alongside Envoy.
First, hoop.dev guardrails refuse banned methods and normalized paths before they hit the service. Then hoop.dev data masking rewrites matched sensitive values in JSON responses in memory and logs every decision in the audit trail. Explore the MIT-licensed repo on GitHub.
Frequently asked questions
Why do teams use Go with Envoy if Envoy is written in C++?
Writing C++ extensions is hard and slow for most platform teams. Go lets engineers build control planes and custom filters using a safe, familiar language.
Should I use WebAssembly or native Go extensions for custom filters?
WebAssembly runs in a safe sandbox so a crash will not stop the main process. Native Go extensions run faster because they skip the sandbox, but bugs can crash the engine.
How do I secure communication between the Go control plane and data plane?
You should use mutual TLS with short-lived certificates for every discovery stream. This stops rogue apps on your network from pushing fake routing rules to your services.
Related guides
In this post