Every platform team eventually accumulates a graveyard of regex predicates that route traffic by header. They're hard to read, hard to test, and hard to retire.

We wrote a small DSL — three readable lines per rule — that compiles to the same internal representation as our hand-written predicates. The win wasn't performance. The win was that engineers stopped needing a regex tester to read the routing table.

when header.x-tenant in {"acme", "globex"}
and method == "POST"
forward to upstream "billing-v2"

That's the whole rule.

← Back to all posts