Share your repls and programming experiences

← Back to all posts
Round-robin load-balancer with other repls as backends
amasad (3351)

This is a load-balancer that uses other repls as backends. That way you can build a scalable service on!

amasad (3351)

@HappyFakeboulde what are you confused about? Your question doesn't make sense

HappyFakeboulde (237)

@amasad i just don't understand anything
(except the over 9000 reference near the end xD)

amasad (3351)

@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:

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.

HackermonDev (2009)

@amasad does replit website use load balancers?