TcpConnectors not removed or added on the Router Config when target host availability changes
Is your feature request related to a problem? Please describe.
When a Connector (V2) is defined with a target selector, the controller is properly adding/removing the tcpConnectors on the router config based on the presence or absence of the respective Pods.
But when a Connector uses a host to target a specific endpoint (Kubernetes and Non-Kubernetes),
the tcpConnector is never removed or added back based on the availability of the target
host and port.
When you have Connectors for the same routingKey under different sites, and they are
defining the target endpoints using a host, if that host is not available, the tcpConnectors
are not removed from the router config, therefore it is not failing over and the client only
sees errors.
Describe the solution you'd like
The suggestion is to consider adding a Health Check to validate Connectors that are using hosts in order to add or remove the tcpConnector entities from the router, as this is the only practical way for clients to have a failover behavior.
Describe alternatives you've considered
- Adding a healthcheck as part of the router itself (stopping the AMQP receiver)
Additional context
- To reproduce it, create a VAN with 3 sites
- Deploy the hello-world frontend to one of them
- Create a listener to the backend in the site where the FE is running
- Deploy the backend on each of the other two sites
- Create Connectors on each site for the backend application using a host
- Start sending requests
- Stop the backend that is serving one of the sites that has the corresponding connector
- Send requests again
- Requests do not reach the other backend served by the other site