Removing a CPU spike at 70,000+ concurrent users
Session-tracking metrics on the platform's authentication server spiked CPU at peak load. A set-based unique-user count fixed it for a few MB of RAM.
- Role
- Software developer at Fortuna Entertainment Group, owned the authentication server
- Outcome
- CPU spike gone at peak sportsbook traffic, for a few MB of added memory.
- Stack
- Java
- Spring Boot
- Grafana
- Prometheus
- ELK
Problem
I owned the authentication server behind every login on the platform. During major sportsbook events it served peaks of 70,000+ concurrent users, and under that load the session-tracking metrics pushed CPU to critical levels.
Approach
I traced the spike to faulty counter logic in the session metrics and replaced it with a set-based unique-user approach.
Result
- The CPU spike under peak load was eliminated.
- The cost was a few MB of extra RAM.