This challenge is to build your own application layer load balancer. A load balancer sits in front of a group of servers and routes client requests across all of the servers that are capable of fulfilling those requests. The intention is to minimise response time and maximise utilisation whilst ensuring that no server is overloaded. If a server goes offline the load balance redirects the traffic to the remaining servers and when a new server is added it automatically starts sending requests to it.
Great challenge. Load balancer is quite a complex topic and you were able to break it down to such clear steps.
Anyone wishes to learn more about load balancers in a practical way, that is a challenge for you!
I've just finished implementing all three parts with the help of http4s, cats-effect IO and cats.effect.Ref (concurrent mutable reference).
I also considered using actor model which is great for encapsulating mutable state in a thread safe manner.
Those of you who are interested may check: https://github.com/Ghurtchu/lb.
Thank you John, this challenge was the most interesting so far, can't wait to move forward and complete others!