Our great sponsors
-
serviceq
Super fault-tolerant HTTP load balancer & queue. White paper for reference - https://github.com/gptankit/serviceq-paper
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
When you have so many metrics to consider, ideal choice is to assign weights to each metric and let the load balancer distribute load probabilistically (think weighted random). Implemented a load balancer in Go on similar lines (https://github.com/gptankit/serviceq) by calculating 'effective error' as weight from each node and inversely distributing load to the cluster. This ensures that a) one single node doesn't get overwhelmed with all the requests and b) even if some node is down, it keeps receiving a small percentage of requests (albeit lesser and lesser as time progresses).
Related posts
- I've created a project, round-robin-go is an implementation of round-robin algorithm that allows you to use your resources in a shared rational order. This project uses go generics that enables you to use any data type in your round robin implementation. Open to suggestions and contributions
- I implemented a round-robin in Go with generics. Potentially for load balancing but can be used for any objects for rational sharing or execution. Open for suggestions or contributions
- Let's Create a Simple Load Balancer With Go - kasvith.me
- HashiCorp Consul: What's the catch?
- My favorite hosting stack: Consul, Nomad and Vault on Digital Ocean