Address Envoy
Routing
Being a Comprehensive Manual of Packet Pathways,
Network Villages & Digital Correspondence
< Chapter II >The Village Map
In the village of Address Envoy, every message must find its way. Picture a quaint hamlet where cottages line winding lanes, each dwelling a server, each crossroad a router, and every cobblestone path a network cable humming with purpose.
The envoy proxy sits at the village square -- the central hub through which all correspondence flows. It knows every address, every shortcut, every back lane that might speed a letter on its way.
When a packet arrives at the village gate, it carries an address -- not unlike the careful copperplate script on a wax-sealed envelope. The envoy reads this address, consults its routing tables (kept in a great leather ledger), and dispatches the message along the most efficient path.
See the diagram opposite for the complete village layout and its principal routing pathways.
< Chapter III >The Envelope's Journey
Every packet begins its life as a carefully prepared envelope. The sender inscribes the destination address, affixes the proper routing stamps, and entrusts it to the envoy service at the village gate.
The journey proceeds in orderly stages, each one a checkpoint along the garden path:
The envelope arrives at the outer gate. The gatekeeper inspects the seal and checks the Host header against the village registry.
The envoy consults its route_config ledger, matching the path prefix to the correct cottage lane.
If multiple cottages serve the same purpose, the envoy selects the least busy one -- like choosing which bakery has the shortest queue.
The letter is passed through the cottage door. The upstream service reads it, prepares a response, and sends the reply envelope back along the same garden path.
< Chapter IV >The Crossroads
At the heart of the village stands the Crossroads -- that complex intersection where routing decisions are made in the space of microseconds. Here, the envoy must evaluate multiple conditions simultaneously, like a traffic warden at a busy junction.
The routing logic follows a hierarchy of rules, each a signpost at the crossing:
The envoy examines the request path against its prefix tree. A request for /api/v2/users is matched to the /api/v2 route cluster.
Custom headers like x-envoy-route can override default routing, directing traffic down unexpected lanes.
Traffic can be split by percentage across upstream clusters -- 90% to the stable cottage, 10% to the newly built one for canary testing.
If a cottage does not answer the knock, the envoy will try the next door. Up to max_retries: 3 attempts before returning to sender.
< Chapter V >The Archive
In the village archive, the great ledgers are kept -- meticulous records of every route, every cluster, every listener configured in the envoy system. Here we find the configuration inscribed in YAML, that most readable of notations.
static_resources:
listeners:
- name: village_gate
address:
socket_address:
address: 0.0.0.0
port_value: 8080
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
route_config:
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match:
prefix: "/api"
route:
cluster: api_cottage
- match:
prefix: "/"
route:
cluster: web_cottage
clusters:
- name: api_cottage
type: STRICT_DNS
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: api_cottage
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: api-service
port_value: 3000
< Chapter VI >The Garden Gate
You have walked the paths, studied the maps, and read the ledgers. The village of Address Envoy holds no more secrets for you -- only further lanes to explore, deeper gardens to tend.
Beyond this gate, a starlit path leads to new territories: service meshes that span continents, observability gardens where metrics bloom like wildflowers, and security hedges trimmed to exacting standards.
~ Finis ~