[ANN] Balancer 1.0

announce

#1

I’m pleased to announce that Balancer 1.0 is now available on opam, it’s a collection of load balancing algorithms, such as p2c, consistent hashing + least loaded, p2c with partial key grouping, round robin, etc.

All of the balancers are written with service discovery in mind, so you can plugin a react signal and use a watch with zookeeper or whatever.

It also comes with some useful synchronization utils for shared mutable state.

I think it’s a useful addition to the ecosystem, just because people scale ocaml by spawning a lot of processes and talking via tcp, domain sockets, files, etc, and I’m actually surprised there wasn’t a library for it beforehand.

https://opam.ocaml.org/packages/balancer/


#2

Out of curiosity would any of you prefer it, if each balancer was a generic cointainer rather than using a {id, host, port} tuple, removing the Lwt deps, and adding a sharding module type?

Or is that just premature optimization, on my part?