Avatar of jeromedalbert
Senior Backend Engineer at StackShare
Shared insights
on
UnicornUnicornPumaPumaRailsRails
at

We switched from Unicorn (process model) to Puma (threaded model) to decrease the memory footprint of our Rails production web server. Memory indeed dropped from 6GB to only 1GB!

We just had to decrease our worker count and increase our thread count instead. Performance (response time and throughput) remained the same, if not slightly better. We had no thread-safety errors, which was good.

Free bonus points are:

  • Requests are blazing fast on our dev and staging environments!
  • Puma has first-class support for WebSockets, so we know for sure that Rails ActionCable or GraphQL subscriptions will work great.
  • Being on Puma makes us even more "default Rails"-compliant since it is the default Rails web server these days.
READ LESS
6 upvotes2 comments148.1K views
Francisco Quintero
Francisco Quintero
March 21st 2019 at 1:20pm

have you guys tried Phusion Passenger?

Reply
Jerome Dalbert
Jerome Dalbert
March 28th 2019 at 9:56pm

Some of us have had bad experiences with Phusion Passenger back in the day:

- too much hassle to compile custom nginx modules

- upgrades were a pain as you had to recompile code just for a version bump

Maybe things have improved since then, but we didn't want to take any chance. Puma (or Unicorn) work out of the box.

Reply