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

Passenger

1.4K
296
+ 1
199
Puma

834
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 · 28K 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?
    NGINX
    nginx [engine x] is an HTTP and reverse proxy server, as well as a mail proxy server, written by Igor Sysoev. According to Netcraft nginx served or proxied 30.46% of the top million busiest sites in Jan 2018.
    Apache HTTP Server
    The Apache HTTP Server is a powerful and flexible HTTP/1.1 compliant web server. Originally designed as a replacement for the NCSA HTTP Server, it has grown to be the most popular web server on the Internet.
    Apache Tomcat
    Apache Tomcat powers numerous large-scale, mission-critical web applications across a diverse range of industries and organizations.
    Microsoft IIS
    Internet Information Services (IIS) for Windows Server is a flexible, secure and manageable Web server for hosting anything on the Web. From media streaming to web applications, IIS's scalable and open architecture is ready to handle the most demanding tasks.
    OpenResty
    OpenResty (aka. ngx_openresty) is a full-fledged web application server by bundling the standard Nginx core, lots of 3rd-party Nginx modules, as well as most of their external dependencies.
    See all alternatives