How we migrated application servers from Unicorn to Puma
Jul 8, 2020Craig Gomes

Summary
This post details the technical migration from Unicorn to Puma web servers. It explains the architectural differences between single-threaded (Unicorn) and multi-threaded (Puma) models, highlighting Puma's benefits for memory reduction (approx. 40%) and scalability. The post outlines the implementation steps, including experimental development use, setting up identical environments for testing, a phased rollout plan, and the resolution of specific issues like thread-safety with ChronicDuration and latency tuning. It also describes an upstream patch to Puma to address uneven capacity distribution. The results show a ~37% drop in memory usage.