The client’s Unity 3D mobile game faced significant backend stability issues: servers crashed intermittently, auto-scaling behaved unpredictably, and players were often disconnected mid-session.
During this project, we identified and resolved key problems:
- Memory Leaks – Fixed a server memory leak that caused crashes once the system reached its limit.
- Auto-Scaling Issues:
- Upscaling thresholds were set too high, extending server stress periods. We reduced them and introduced scheduling to maintain a higher minimal server count at peak utilization periods.
- Servers scaled down without proper user drainage, terminating active sessions. We implemented a graceful drainage mechanism with delays to allow sessions to end naturally.
- Daily forced disconnections occurred due to a misconfigured auto-update system that rebooted the web server. We reconfigured it to hot-reload the web server without dropping connections, and only when updates were available.
Technologies Used:
AWS EC2 Auto Scaling, Linux, Bash, TypeScript, Nginx