fonoster / routr

⚡ The future of programmable SIP servers.
https://routr.io
MIT License
1.42k stars 147 forks source link

Enhance EdgePort service fo better load-balancer compatibility #223

Closed psanders closed 1 year ago

psanders commented 1 year ago

Is your feature request related to a problem? Please describe.

The EdgePort service currently uses a single service to handle various ports (TCP, UDP, TLS, WS, WSS). However, certain K8s load-balancers, including Digital Ocean's, have specific requirements and limitations. For instance, some don't allow mixing UDP and TCP transport in the same service.

Additionally, Digital Ocean mandates the inclusion of a health check, which can only operate with HTTP or TCP, not UDP.

Describe the solution you'd like

We should enhance the EdgePort's service to account for the behavior of K8s load-balancers. This might involve creating separate services for different transport protocols and include configuration to enable health-check at the service level.

Perhaps health-checks such be enable by default

Describe alternatives you've considered

None. We must make this enhancement to enhance Routr's compatibility.

Additional context

Note: We should research to see how common is to have healthcheck as part of the load-balancer.

psanders commented 1 year ago

Se the following for a reference about mixing protocols in some k8s load-balancers:

 - status: 400 Bad Request, code: 400, reason: {"code":"invalid_parameter_loadbalancer_endpoints","result":"failed","reason":"If UDP protocol is requested, all loadbalancer endpoints must use UDP protocol"}