puppetlabs / puppetlabs-haproxy

Puppet module to dynamically configure haproxy on Redhat family OSes using storeconfigs
Apache License 2.0
102 stars 265 forks source link

Adding UDP support #608

Open limanzhang-ess opened 2 months ago

limanzhang-ess commented 2 months ago

Use Case

When I am trying to do loading balancing for graylog, I found that there was no support for UDP in the module.

Describe the Solution You Would Like

For example, receiving UDP traffic on port 5140 and forward it to backend server1:5140 and server2:5140.

listen graylog_udp
 mode udp
 bind :5140
 balance roundrobin
 server server1 ip1:5140 check
 server server2 ip2:5140 check
limanzhang-ess commented 1 month ago

Or function like

log-forward syslog
  # Accepts incoming TCP messages
  bind 0.0.0.0:5140
  # Accepts incoming UDP messages
  dgram-bind 0.0.0.0:5140
  # Sends outgoing messages via UDP
  log logserver:5140 local0