News
BackLoad Balancer "as a Service" With UDP Support
TCP is typically associated with reliability – if individual packets in a connection are lost, this is detected and the packets are resent. However, its use in DNS or VPNs shows that UDP also covers important use cases. Our load balancer now supports both protocols, allowing you to horizontally scale both TCP- and UDP-based services and protect them from failures.
The right protocol for every use case
Compared to TCP, UDP saves a certain amount of overhead; in data transmission using UDP, for example, data packets can be lost without being retransmitted. In a video stream, for example, this may well be desirable; it is better to have a few pixels missing than to have to stop everything and wait for the missing data packets. In a VPN tunnel, on the other hand, the inner, encapsulated connection can respond to transmission errors and, if necessary, request that the data be sent again.
This makes it clear that UDP-based services cover a wide range of use cases that are by no means less demanding in terms of availability and server capacity. If you operate such services at cloudscale, be sure to use our "LBaaS" for them as well. With two or more backend servers – ideally in "anti-affinity" – processing requests in parallel, you not only increase the overall capacity but also the availability of your service as a whole.
Special characteristics of LBaaS with UDP
In the case of TCP, our load balancer distributes individual connections to the available backend servers ("pool members"). UDP does not work with connections like this; instead, the load balancer distinguishes between individual data flows, which are identified by their respective combination of source and destination IPs and ports. Packets with matching values are assigned to the same data flow (and thus the same backend) over several minutes, which already leads to a certain degree of "session stickiness" by default.
Our comprehensive API documentation includes tables showing you the supported protocol combinations. For example, it is possible for pool members to use (TCP) HTTP status codes to signal to the health monitor whether they are ready to process requests, even if the actual requests are then transmitted via UDP.
Please note that the load balancer currently supports UDP for IPv4 traffic only. If your load balancer is accessible from the internet, it will be assigned both an IPv4 and an IPv6 address by default; in this case, simply do not enter any AAAA DNS records for the hostnames on which you (also) operate UDP services.
UDP is ubiquitous, not just when it comes to DNS. Use our load balancer for your UDP-based services too, to make your setup even more robust and elegantly handle maintenance work, for example. And if you do not have any experience with our LBaaS yet, you will find a good overview to get you started in the post about the components of a load balancer.
Reliably,
Your cloudscale team