hashicorp / consul

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
https://www.consul.io
Other
28.31k stars 4.42k forks source link

UDP support in Consul Connect #9037

Open fredwangwang opened 3 years ago

fredwangwang commented 3 years ago

Feature Description

allow specifying UDP as the protocol when setting up consul connect, which then can be used for one way UDP communication between services (metrics sink for example).

Use Case(s)

As stated here: https://github.com/hashicorp/nomad/issues/9161#issuecomment-716550628, there is no easy way right now to setup UDP communication between services in the mesh at the moment. Allow UDP will make sending metrics from one service to another within service mesh on nomad a lot easier.

Although not related to my use case, there are some discussion about udp support in istio: https://github.com/istio/istio/issues/1430. Not sure if they are relevant/applicable in the context of Consul Connect.

chrisjohnson commented 3 years ago

We are actively pursuing consul connect and lack of UDP support is a hurdle for us as well

blake commented 3 years ago

@chrisjohnson Would you mind sharing a bit more info on the specific types of UDP traffic you'd like to proxy (e.g., RADIUS, DNS, NTP, etc)?

I'm just trying to get a better understanding of how folks might use this feature if it were supported in Consul.

chrisjohnson commented 3 years ago

Metrics are the largest use case that I know of off-hand, I can get some more info from the folks who have pushed back around the lack of UDP support though and update

dgparker commented 3 years ago

This would be really nice for WebRTC workloads ;)

redterror commented 3 years ago

Part of the deployment I'm planning for Connect uses UDP for inter-service protocols based on protobuf (in addition to other TCP-based stuff). Current solution looks to be a mix of connect and prepared queries, but it would be nice to unify via connect.

tdeheurles commented 2 years ago

Hey,could you tell us if some move are ongoing for UDP support please ?

lopcode commented 1 year ago

Just in case this helps anyone else debugging Datadog's Docker support - I bumped in to this limitation setting up Datadog in Nomad, exposing it to other services using Consul Service Mesh. Didn't realise port 8126 used TCP for APM traces, and 8125 used UDP for stats. This manifested as traces showing up in my dashboard, but Java agent profiling stats not being present.

matthiasschoger commented 2 weeks ago

Found this ticket since I'm also looking for a way to use Consul Connect with UDP traffic. My main use-case would be load-balancing UDP traffic from the ingress to the target service.

Doing some research I found that Envoy is supporting UDP for some time now. https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/udp_filters/udp_proxy

Would be great if this could be included into Consul Connect.