# Replit — Worldwide Repls, part 2: Load balancing for fun (although not quite profit)

- Company: Replit (replit.com)
- Announced: 2022-09-23T18:00:00+00:00
- Category: infrastructure-release
- Coverage: not counted
- Announcement: no
- Group: routine
- Source: https://replit.com/blog/geo-part-2-loadbalancing
- Record: https://forck.live/items/18102-worldwide-repls-part-2-load-balancing-for-fun-although-not-quite-profit
- Subject: Replit Agent

Replit developed a custom load balancer to address issues with Google Cloud Load Balancer, which caused uneven load distribution and suboptimal container placement across its fleet. The new system uses subsetting to select a subset of healthy machines and then applies a policy (random or round-robin) to route requests, improving container count variance between median and 99th percentile. The load balancer was built after a proof-of-concept and simulator validated the approach, and it handles connections with load differences up to 6 or 7 orders of magnitude.

## Evidence

Verbatim from https://replit.com/blog/geo-part-2-loadbalancing:

> What this means is that a proportion of machines are being overloaded and providing suboptimal service to users, and other machines are being underutilized. This meant that a proportion of users would get a bad experience and were seeing both slower Repls, and also have those Repls be less stable due to spurious timeouts that happen when a machine is overloaded.

---

Record: https://forck.live/items/18102-worldwide-repls-part-2-load-balancing-for-fun-although-not-quite-profit
Catalogue: https://forck.live/llms.txt
Current issue: https://forck.live/feed.md
