cl-yxorp icon indicating copy to clipboard operation
cl-yxorp copied to clipboard

Loadbalancer

Open rpx99 opened this issue 1 year ago • 3 comments

Hey, looks like cool stuff! Think for production use load balancing would be a big plus / must have. Thanks a lot if possible to make that happen!

rpx99 avatar May 05 '23 18:05 rpx99

If you have some load balancing code you can plug it into your own :destinator. I have considered including such load balancing algorithms for use, but ther are many types and it seems most are non-trivial. Is there a specific load balancing algorithm you are interested in having?

charJe avatar May 05 '23 18:05 charJe

Thanks for the hint with : destinator

No don't have the code. I just discovered your package and am surprised there exists a cl replacement for nginx at all which is great! I need to try your implementation!

Regarding the load balancing there are round robin, least connection and hash approaches (IP or generic), c.f. https://dzone.com/articles/nginx-reverse-proxy-and-load-balancing

Don't know exactly which one is favourable and I need to research or ask someone else.

rpx99 avatar May 05 '23 18:05 rpx99

Round robin shouldn't be too hard to do. Maybe you could play around with something like a make-round-robin function that take a variable number of port and host names and returns a destinator function that will do the round robin work. I would be happy to take a look at a pull request.

charJe avatar May 05 '23 19:05 charJe