Comparing App Server Performance

14-Dec-2020 1286
Puma is not faster than any other Ruby application server.There! I said it. I'm a maintainer of the project, and yet I don't think it's all that fast. Actually, I think Puma is probably a little bit slower than other app servers.But, what does the word "fast" mean in this context?Usually when we're talking about fast we mean latency: how long it takes to do a particular action. So, in the context of an app server, we mean "how long does it take this app server to serve a trivial response". A trivial response would be a "hello world" app. In Rack terms, something like:lambda { |env| [200, {"Content-Type" => "text/plain"}, ["Hello World"]] }Now, I've done this benchmark with Puma, and it turns out it takes Puma about 100 microseconds to serve that response. That means that 1 Puma process can serve 1/0.0001 requests per second in this scenario, or about 10,000 requests per second. Great!.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle