Inbound & Outbound as Distinct Sets
Bipartite Graphs in Network Architecture
A bipartite graph divides nodes into two sets, with edges allowed only between sets (never within a set).
Network boundaries have natural bipartite structure:
- Ingress side: outside clients on one side, internal services on the other. Edges: external requests entering, internal responses going out.
- Egress side: internal services on one side, external destinations on the other. Edges: internal services initiating outbound calls, external responses coming back.
The asymmetry:
- Ingress: source set is unbounded (anyone on the internet). Destination set is small (a few services). Volume scales with users.
- Egress: source set is small (a few internal services). Destination set is bounded (a few known partners). Volume scales with internal activity.
Single-box design collapses both bipartite halves through one node. That node has fan-in from outside (ingress) AND fan-in from inside (egress's reverse direction). The node's load = sum of both sides.
Split design preserves both bipartite halves at separate nodes. Each node handles one role with its appropriate scaling axis.
Before the Split: A Cut Vertex Everywhere
Single-Box: One Vertex Holds Everything
Before the split, a single proxy box sits between every external/internal pair. In graph terms it is a cut vertex of high order: its removal disconnects all clients from all backends AND all internal services from all external partners.
Connectivity at this node = 1. Anything that disrupts this node (process crash, network glitch, OOM kill) disconnects every dependent path.
After the Split: Cut Vertex Replaced by Two Lighter Nodes
Splitting into ingress + egress creates two graph nodes where there was one. Each node now sits on only one bipartite half:
- Ingress node: cut vertex for the external-clients-to-internal-services bipartite half
- Egress node: cut vertex for the internal-services-to-partners bipartite half
The hairpin loop disappears geometrically: in the single-box graph, an internal service trying to reach an external-facing service via the public address required traversing the same vertex twice (out via the egress role, then in via the ingress role). In the split graph, the traversal hits two different vertices.
Connectivity per side stays at 1, but the two cut vertices can be replaced independently. Adding a second ingress proxy raises ingress-side connectivity to 2 without changing the egress side.
Replication Per Side
Production fleets often run 2+ ingress proxies (HA) AND 2+ egress proxies (HA). Each side reaches connectivity 2 independently. Capacity scales horizontally on each side as needed.
Network Partition Tolerance
Synthesis
You can now read network architectures as bipartite graphs, identify cut vertices, & track connectivity per half.
Apply this to network partitions.
A network partition is a graph cut: edges across the partition fail; both sides keep operating but cannot reach each other.
A geographically distributed system has two datacenters connected by a single inter-DC link. Ingress traffic enters via DC1; egress goes through DC1 to external partners; some internal services live in DC2 & call back into DC1 for stateful operations.
Companion Notes
Companion Notes
This geometry-of lesson recasts the Ingress & Egress Separation main lesson as a bipartite-graph analysis.
The next companion, geometry_of_failure_modes_and_blast_radius, derives betweenness centrality (identifies bottleneck nodes) & min-cut (bounds blast radius).
Well done.