Hacker News new | past | comments | ask | show | jobs | submit login

you can improve this be picking top 3 server with least connections and then pick one randomly from these 3 servers.



Inverting this is actually better because it avoids the stale data / herd behavior. i.e. randomly choose X candidate servers and then pick the one with least load. also, 2 may be better than 3

https://brooker.co.za/blog/2012/01/17/two-random.html


Caddy has this with `lb_policy random_choose 2`. See https://caddyserver.com/docs/caddyfile/directives/reverse_pr....




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: