sleinen / samplicator

Send copies of (UDP) datagrams to multiple receivers, with optional sampling and spoofing
GNU General Public License v2.0
391 stars 133 forks source link

Load Balancing #21

Open sleinen opened 9 years ago

sleinen commented 9 years ago

From aliki...@gmail.com on March 22, 2012 16:02:58

Hi,

Is it possible to do load balancing using the frequency parameter ?

Case:

10K requests come to Samplicator, it needs to divide to Server A 5K, Server B 5K requests. (Servers have application to send back responds.)

BR, Ali KIZIL

Original issue: http://code.google.com/p/samplicator/issues/detail?id=22

sleinen commented 9 years ago

From simon.le...@gmail.com on March 22, 2012 15:01:49

No, this is currently not possible. I'm reclassifying this as a request for enhancement. I also gave it low priority, because I'm not sure samplicator is a good basis for a load balancer. It would probably not be too hard to turn it into a "poor man's load balancer" for sufficiently stateless applications such as DNS. The only simple way to use this would be in "spoofing" mode with direct return (DSR) from the actual servers. I don't have much experience with load balancers, but I assume that people generally expect a bit more functionality from them. In particular, a load balancer should notice when one of the destinations is down and stop sending it packets (and start again when it is up). This doesn't seem straightforward to me at all, especially because in spoofing mode, samplicator doesn't even see the replies. So my recommendation would be to try to find "real" load balancing software instead.

Labels: -Type-Defect -Priority-Medium Type-Enhancement Priority-Low

sleinen commented 9 years ago

From aliki...@gmail.com on March 26, 2012 01:18:30

Dear Sir,

I understand your meaning. Yes, it looks like there is small demand for load balancing UDP packages. However, when you search internet, you can not find an easy-to-use tool to load balance UDP packages. In my case, I need this kind of solution for an server - client app communicating over UDP. But, there are some servers using video transmission over UDP and also load balancing can be a good solution for them.

Now how I use your tool for load balancing it is, I duplicate coming requests into 2 and send to 2 servers. In 2 servers I do IP filtering and recude demand to main app by half. So I can do some "strange :)" load balancing.

Your tool is very useful. Thank you for sharing it with open source community.

BR, Ali KIZIL