Need advice about which tool to choose?Ask the StackShare community!

Passenger

1.4K
296
+ 1
199
Puma

836
262
+ 1
20
Add tool

Passenger vs Puma: What are the differences?

Introduction

In the world of web application deployment, two popular servers stand out: Passenger and Puma. Both are known for their high performance and reliability. However, there are some key differences between the two that are worth exploring. In this article, we will delve into these differences and provide a clear understanding of when to use Passenger and when to opt for Puma.

  1. Concurrency Model: One of the primary differences between Passenger and Puma lies in their concurrency models. Passenger operates on a process-based model, which means each request is handled by a separate process. On the other hand, Puma utilizes a thread-based model, where multiple requests can be handled by a single process through threads. This fundamental distinction has implications for resource utilization and scalability.

  2. Resource Usage: Due to their respective concurrency models, Passenger and Puma exhibit different resource utilization patterns. Passenger tends to be more resource-intensive as each request is handled by a separate process that requires its own resources. On the contrary, Puma's thread-based model allows for higher resource efficiency as multiple requests can be served by a single process with shared resources. This can result in reduced memory consumption and improved server performance.

  3. Scalability: Scalability is a crucial aspect of web application servers. Passenger and Puma differ in their scaling capabilities. Passenger excels in vertical scaling, where additional resources are allocated to handle the increased load on a single server. Puma, on the other hand, is designed for horizontal scaling, enabling multiple processes or servers to work together to handle larger traffic volumes. This provides more flexibility in accommodating growing user demands.

  4. Middleware Support: Middleware plays a significant role in enhancing the functionality of web applications. Passenger and Puma vary in terms of middleware support. Passenger offers a wide range of built-in middlewares, simplifying the integration of various components and services into the application stack. Puma, on the other hand, has a minimalistic middleware stack, providing only essential functionality. While Passenger's extensive middleware support makes it more suitable for complex applications, Puma's lightweight approach may be preferable for simpler use cases.

  5. Ease of Configuration: Setting up and configuring a web server can be a complex task. Passenger and Puma differ in ease of configuration. Passenger provides a more user-friendly configuration experience with intuitive options and extensive documentation. It aims to simplify the process for developers who may not have deep server administration knowledge. Puma, on the other hand, requires a more hands-on approach to configuration, catering to experienced developers who prefer fine-grained control over server settings.

  6. Maturity and Community Support: When evaluating web servers, the maturity of the software and community support are crucial considerations. Passenger has a longer history and a more established user base, making it a reliable choice for many developers. It benefits from a vibrant community that actively contributes to its development and provides support. Puma, while relatively newer, has gained significant popularity and has a growing community. However, it may not have the same level of maturity and extensive ecosystem as Passenger.

In summary, Passenger and Puma differ in their concurrency models, resource usage, scalability, middleware support, ease of configuration, and maturity/community support. Understanding these distinctions is essential in deciding which server is best suited for a specific web application deployment scenario.

Advice on Passenger and Puma
Mark Ndungu
Software Developer at Nouveta · | 4 upvotes · 28.2K views
Needs advice
on
PumaPuma
and
UnicornUnicorn

I have an integration service that pulls data from third party systems saves it and returns it to the user of the service. We can pull large data sets with the service and response JSON can go up to 5MB with gzip compression. I currently use Rails 6 and Ruby 2.7.2 and Puma web server. Slow clients tend to prevent other users from accessing the system. Am considering a switch to Unicorn.

See more
Replies (1)
Recommends
on
PumaPuma

Consider trying to use puma workers first. puma -w basically. That will launch multiple puma processes to manage the requests, like unicorn, but also run threads within those processes. You can turn the number of workers and number of threads to find the right memory footprint / request per second balance.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Passenger
Pros of Puma
  • 43
    Nginx integration
  • 36
    Great for rails
  • 21
    Fast web server
  • 19
    Free
  • 15
    Lightweight
  • 14
    Scalable
  • 13
    Rolling restarts
  • 10
    Multithreading
  • 9
    Out-of-process architecture
  • 6
    Low-bandwidth
  • 2
    Virtually infinitely scalable
  • 2
    Deployment error resistance
  • 2
    Mass deployment
  • 2
    High-latency
  • 1
    Many of its good features are only enterprise level
  • 1
    Apache integration
  • 1
    Secure
  • 1
    Asynchronous I/O
  • 1
    Multiple programming language support
  • 4
    Free
  • 3
    Convenient
  • 3
    Easy
  • 2
    Multithreaded
  • 2
    Consumes less memory than Unicorn
  • 2
    Default Rails server
  • 2
    First-class support for WebSockets
  • 1
    Lightweight
  • 1
    Fast

Sign up to add or upvote prosMake informed product decisions

Cons of Passenger
Cons of Puma
  • 0
    Cost (some features require paid/pro)
  • 0
    Uses `select` (limited client count)

Sign up to add or upvote consMake informed product decisions

What is Passenger?

Phusion Passenger is a web server and application server, designed to be fast, robust and lightweight. It takes a lot of complexity out of deploying web apps, adds powerful enterprise-grade features that are useful in production, and makes administration much easier and less complex.

What is Puma?

Unlike other Ruby Webservers, Puma was built for speed and parallelism. Puma is a small library that provides a very fast and concurrent HTTP 1.1 server for Ruby web applications.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention Passenger and Puma as a desired skillset
What companies use Passenger?
What companies use Puma?
See which teams inside your own company are using Passenger or Puma.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Passenger?
What tools integrate with Puma?
    No integrations found

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    What are some alternatives to Passenger and Puma?
    JavaScript
    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
    Git
    Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
    GitHub
    GitHub is the best place to share code with friends, co-workers, classmates, and complete strangers. Over three million people use GitHub to build amazing things together.
    Python
    Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
    jQuery
    jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.
    See all alternatives