GitLab
GitLab logoGitLab · Feature trail

Application Server Migration (Unicorn to Puma)

2 posts · Jun 2015 – Apr 2021

What this trail covers

GitLab has successfully migrated its application servers from the single-threaded Unicorn to the multi-threaded Puma web server. This migration aimed to address memory growth issues and improve scalability by reducing the number of processes and memory overhead. Puma's multi-threaded model allows for better utilization of CPU and memory, leading to significant memory reduction. The implementation involved extensive testing, tuning of worker/thread configurations, and addressing thread-safety issues. The post also details the use of `unicorn-worker-killer` to manage memory leaks in long-running Unicorn workers by periodically restarting them when memory thresholds are exceeded, ensuring stability and preventing outages.

All GitLab trails