Round-robin load-balancer with other repls as backends
This is a load-balancer that uses other repls as backends. That way you can build a scalable service on repl.it!
Can I use this?
Uhhhh what?
@HappyFakeboulde what are you confused about? Your question doesn't make sense
@amasad i just don't understand anything
(except the over 9000 reference near the end xD)
@HappyFakeboulde so imagine you build a web app and it gets really popular. Your server might not be able to handle the load.
What you could do then is replicate the server multiple times and now you have multiple servers with the same code running that could handle the requests. This is called horizontal scaling. But you need some way to distribute the requests between servers:
https://storage.googleapis.com/replit/images/1539648267879_05a88c109413e2fa64a2cbdeb6bf1d51.pn
A load-balancer receives a request and by using some distribution algorithm (this one just distributes it evenly) and it forwards it to one of the backend servers.
cool