A set of backend types were introduced to then selectively route traffic like this. But a matcher functionality exists already that would select appropriate backends depending on the incoming request.
The matcher mechanism is much more extensive since it allows us to inspect HTTP requests fully. It also results in a less verbose and more readable code to select backends depending on incoming requests. An example of this is already present for cascading backends here.
Refactor the code to use matchers instead of backend types for choosing which route to take for a given request.