Go faster
tick-rate was getting overwhelmed when multiple people used the site simultaneously. Several improvements have been made to speed things up and handle more users.
Performance
- Notifications: Stopped notification bursts from generating excessive repeated requests (i.e. You no longer get punished for being famous).
- Faster profiles: Eliminated unnecessary database requests and introduced caching so it doesn't rebuild the same profile every time someone visits.
- Faster images: Optimized profile pictures and game covers to load smaller images without sacrificing quality.
- Smoother interactions: Improved how likes, comments and other interactions load, reducing unnecessary waiting.
- Less background work: Removed unnecessary profile loading and other background requests that were consuming resources even when users never opened those pages.
- Improved stability: Reduced database bottlenecks and duplicate work that could cause the site to slow down or stop responding when several people were browsing simultaneously
Under load
- Fixed an issue where many profile caches could expire at the same time, causing the site to periodically slow down or appear to freeze.
- Fixed a larger issue where multiple people opening the same uncached profile could each trigger their own copy of the same work. At 50 simultaneous visitors, this previously caused every request to time out.
- Those visitors now share a single profile rebuild instead. The same 50-person test now completes in roughly 0.6 seconds.
Before and After
| Metric | Before | After |
|---|---|---|
| Profile render time | ~742 ms | ~149 ms |
| Profile avatar payload | 241.8 kB | 11.2 kB |
| Game cover payload | 51.9 kB | 2.1 kB |
| Grouped notification query | ~396 ms | ~6 ms |
| Cache-expiry p95 latency | 494 ms | 189 ms |
| 50 users opening the same cold profile | 100% timed out after 60s | ~0.6s, zero failures |
| 10-user load test p95 | 4,929 ms | 98 ms |
| Database timeouts at 10-user load | 38 | 0 |
| 50-user concurrency test | Could collapse under duplicate rebuilds | ~74 req/s, zero failures |
Comments
Sign in to comment.
kulla@kulla
ππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈππΎββοΈ