So I'm wondering if a static router with dynamic services is possible? Currently, everything is dynamic as tags on the services within Consul. This means if the service is not running that has my higher priority router is not running, the router won't be registered and it'll fall through to the lower priority route.
As an example, I have two services (and two routers):
'frontend' router serves anything from
'graphql' router has a higher priority, but only serves
If for any reason the graphql service isn't registered with Consul (service crashed, or mid upgrade), the graphql router will not exist, and any requests to
/graphql get caught by the frontend router. This is somewhat confusing as it'll show as a 405 or 404, rather than something more obvious like a 502 or 503.
Is it possible to 'statically' define the routers so they will always serve an error like http 502, until their appropriate services get registered within Consul?