Replace Unicorn with Puma


(Flap Jack) #1

Most people I know made the switch ages ago. Maybe Discourse could do the same?

http://puma.io/


(Jeff Atwood) #2

see


#3

Was the codebase written with thread safety in mind? I find that when a project wasn’t designed that way from the ground up, it is in fact, not thread safe. Lots of class variables and module variables being used, or even shared instances of classes / singleton objects.

Even Rails itself which claims to be thread safe is not really; Observers and EachValidators are singleton objects and memoizing data in instance variables will be available to all threads, not to mention exist for the life of process. Super dangerous.

I’m a fan of Puma as a way of cheaply increasing throughput (a typical request, be it http or background job, is mostly IO) and was planning on a Discourse deploy using it.

Thanks for the info.


(Sam Saffron) #4

The project runs very multithreaded in sidekiq, and there is huge api coverage there