# puma/puma

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/puma-puma).**

7,878 stars · 1,474 forks · Ruby · bsd-3-clause

## Links

- GitHub: https://github.com/puma/puma
- Homepage: https://puma.io
- awesome-repositories: https://awesome-repositories.com/repository/puma-puma.md

## Topics

`multithreading` `rack` `ruby` `server`

## Description

Puma is a concurrent HTTP server for Ruby applications that implements the Rack interface. It operates as a clustered web server, using a combination of worker processes and threads to handle multiple simultaneous web connections via TCP ports or UNIX domain sockets.

The server features a master-worker process model that utilizes multiple CPU cores and employs copy-on-write preloading to reduce memory usage. It supports zero-downtime restarts through socket-handover capabilities, allowing application updates without dropping pending network requests.

The project includes a token-authenticated control interface for production administration, dynamic thread pool scaling to manage request volume, and a plugin architecture for exporting server metrics to external monitoring tools. It also provides built-in support for SSL/TLS connection security and server lifecycle hooks for executing custom logic during boot and shutdown.

## Tags

### Software Engineering & Architecture

- [Master-Worker Process Models](https://awesome-repositories.com/f/software-engineering-architecture/distributed-coordination-systems/task-coordinations/master-worker-process-models.md) — Implements a clustered master-worker process model to utilize multiple CPU cores and isolate request handling. ([source](https://cdn.jsdelivr.net/gh/puma/puma@main/README.md))
- [Multi-Threaded Request Handling](https://awesome-repositories.com/f/software-engineering-architecture/high-throughput-task-processing/network-request-processing/multi-threaded-request-handling.md) — Scales web traffic by distributing network IO and request handling across multiple CPU cores using threads and processes.

### Web Development

- [Rack Application Servers](https://awesome-repositories.com/f/web-development/rack-application-servers.md) — Provides a concurrent HTTP server designed specifically to host Ruby web applications adhering to the Rack interface. ([source](https://cdn.jsdelivr.net/gh/puma/puma@main/README.md))
- [Concurrent Request Pooling](https://awesome-repositories.com/f/web-development/http-request-managers/concurrent-request-pooling.md) — Implements parallel HTTP request processing using a capped pool of worker threads and processes to maximize throughput.
- [HTTP Servers](https://awesome-repositories.com/f/web-development/http-servers.md) — Provides a concurrent HTTP server engine designed to handle and route web traffic using a combination of processes and threads.
- [Application Servers](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-infrastructure-servers/application-servers.md) — Functions as a standard-compliant application server that interfaces between Ruby web frameworks and the network via Rack.
- [Pre-Forking Servers](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-infrastructure-servers/http-servers/extensible-web-servers/pre-forking-servers.md) — Operates as a pre-forking server that utilizes a master-worker process model to handle concurrent HTTP requests.
- [Web Server Hosting](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-infrastructure-servers/web-server-hosting.md) — Serves as a high-performance infrastructure server for hosting Ruby web applications using the Rack protocol.

### Networking & Communication

- [Network Socket Bindings](https://awesome-repositories.com/f/networking-communication/network-socket-bindings.md) — Supports binding the server to either TCP ports or UNIX domain sockets for incoming network traffic. ([source](https://puma.io/puma4/))
- [Zero-Downtime Socket Handovers](https://awesome-repositories.com/f/networking-communication/zero-downtime-socket-handovers.md) — Supports zero-downtime restarts by transferring active network sockets from an old process to a new one.

### Programming Languages & Runtimes

- [Thread Pools](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/task-orchestration-frameworks/thread-pools.md) — Manages a dynamic pool of worker threads that scales based on real-time request volume to optimize resource usage.
- [Process Preloaders](https://awesome-repositories.com/f/programming-languages-runtimes/dynamic-class-creation/class-loading-mechanisms/preloading/process-preloaders.md) — Optimizes memory by loading application code into a master process before forking workers via copy-on-write preloading.
- [Dynamic Scaling](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/concurrency/task-orchestration-frameworks/thread-pools/dynamic-scaling.md) — Manages a thread pool that automatically scales between minimum and maximum limits based on traffic volume. ([source](https://cdn.jsdelivr.net/gh/puma/puma@main/README.md))

### DevOps & Infrastructure

- [Restart Automation](https://awesome-repositories.com/f/devops-infrastructure/restart-automation.md) — Enables server restarts without dropping pending requests through a combination of socket handover and process management. ([source](https://cdn.jsdelivr.net/gh/puma/puma@main/README.md))
- [Zero-Downtime Upgrades](https://awesome-repositories.com/f/devops-infrastructure/zero-downtime-upgrades.md) — Implements zero-downtime upgrades by handing over sockets to new processes without interrupting active network connections.

### Operating Systems & Systems Programming

- [Copy-on-Write Memory Optimizations](https://awesome-repositories.com/f/operating-systems-systems-programming/copy-on-write-memory-optimizations.md) — Reduces total memory footprint by preloading application code into the master process before forking workers.

### Security & Cryptography

- [TLS/SSL Configurations](https://awesome-repositories.com/f/security-cryptography/security/cryptography-and-secrets/cryptographic-primitives-management/tls-ssl-configurations.md) — Provides built-in support for SSL/TLS encrypted traffic with customizable cipher suites and certificates. ([source](https://cdn.jsdelivr.net/gh/puma/puma@main/README.md))

### System Administration & Monitoring

- [Administrative Control Interfaces](https://awesome-repositories.com/f/system-administration-monitoring/monitoring-and-status-pages/server-status-monitors/administrative-control-interfaces.md) — Ships a token-authenticated control server and CLI for production administration and status querying. ([source](https://cdn.jsdelivr.net/gh/puma/puma@main/README.md))

### Part of an Awesome List

- [Web Servers](https://awesome-repositories.com/f/awesome-lists/devtools/web-servers.md) — Modern, concurrent web server for Ruby.
