Upgrade Puma to v5.1
We need to update to the latest Puma to use nakayoshi_fork
(https://msp-greg.github.io/puma/Puma/DSL.html#nakayoshi_fork-instance_method).
When enabled, ::Puma will GC 4 times before forking workers. If available (Ruby 2.7+), we will also call GC.compact.
Additionally, we'll benefit from using the actual version of the library.
Before applying any v5-related features (like nakayoshi_fork
) it would be important to make sure v5 is stable in production and check if it brings some difference in CPU/Mem usage as it is.
Rollout sequence (to be updated)
-
Bump the gem version and check if the CI is green -
Check how we updated to Ruby 2.7, it may be a similar strategy -
Communicate with #g-delivery - they suggested regular rollout with sync communication -
Discuss with SRE if need to do a flagged/ENV-var-ed rollout, or just a regular is enough - regular is -
Go through list of Puma 5 breaking changes: !48897 (merged) -
Get approvements on all MRs: CNG/Omnibus/GitLab -
Coordinate CNG/Omnibus/GitLab MRs merges with #g-delivery -
Rollout: may be a separate issue when we get there, monitor on Canary before going live
Related to #288042 (closed)
Edited by Aleksei Lipniagov