https://github.com/Shopify/pitchfork Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} Shopify / pitchfork Public * Notifications * Fork 7 * Star 343 License Unknown, GPL-3.0 licenses found Licenses found Unknown LICENSE GPL-3.0 COPYING 343 stars 7 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights Shopify/pitchfork This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 6 branches 1 tag Code * Clone HTTPS GitHub CLI [https://github.com/S] Use Git or checkout with SVN using the web URL. [gh repo clone Shopif] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @casperisfine casperisfine Merge pull request #13 from sci-phi/patch-1 ... 61444d6 Oct 7, 2022 Merge pull request #13 from sci-phi/patch-1 Update LICENSE for Pitchfork 61444d6 Git stats * 2,740 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows benchmark bin docs examples exe ext/pitchfork_http lib test .git-blame-ignore-revs .gitattributes .gitignore COPYING Dockerfile Gemfile Gemfile.lock LICENSE README.md Rakefile pitchfork.gemspec View code [ ] pitchfork: Rack HTTP server for shared-nothing architecture Disclaimer Features Requirements Installation Usage Rack Configuration File(s) License Thanks README.md pitchfork: Rack HTTP server for shared-nothing architecture pitchfork is a preforking HTTP server for Rack applications designed to minimize memory usage by maximizing Copy-on-Write performance. Like unicorn (which pitchfork is a derivative of), it is designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels. Slow clients should only be served by placing a reverse proxy capable of fully buffering both the request and response in between pitchfork and slow clients. Disclaimer Until this notice is removed from the README, pitchfork should be considered experimental. As such it is not encouraged to run it in production just yet unless you feel capable of debugging yourself any issue that may arise. Features * Designed for Rack, Linux, fast clients, and ease-of-debugging. We cut out everything that is better supported by the operating system, nginx or Rack. * Shared-Nothing architecture: workers all run within their own isolated address space and only serve one client at a time for maximum performance and robustness. Concurrent requests don't need to compete for the GVL, or impact each others latency when triggering garbage collection. It also does not care if your application is thread-safe or not. * Reforking: pitchfork can be configured to periodically promote a warmed up worker as the new template from which workers are forked. This dramatically improves the proportion of shared memory, making processes use only marginally more memory than threads would. * Compatible with Ruby 2.5.0 and later. * Process management: pitchfork will reap and restart workers that die from broken apps. There is no need to manage multiple processes or ports yourself. pitchfork can spawn and manage any number of worker processes you choose to scale to your backend. * Load balancing is done entirely by the operating system kernel. Requests never pile up behind a busy worker process. Requirements Ruby(MRI) Version 2.5 and above. pitchfork can be used on any Unix-like system, however the reforking feature requires PR_SET_CHILD_SUBREAPER which is a Linux 3.4 (May 2012) feature. Installation Add this line to your application's Gemfile: gem "pitchfork" And then execute: $ bundle install Or install it yourself as: $ gem install pitchfork Usage Rack In your application root directory, run: $ bundle exec pitchfork pitchfork will bind to all interfaces on TCP port 8080 by default. You may use the --listen switch to bind to a different address:port or a UNIX socket. Configuration File(s) pitchfork will look for the config.ru file used by rackup in APP_ROOT. For deployments, it can use a config file for pitchfork-specific options specified by the --config-file/-c command-line switch. See the configuration documentation for the syntax of the pitchfork-specific options. The default settings are designed for maximum out-of-the-box compatibility with existing applications. Most command-line options for other Rack applications (above) are also supported. Run pitchfork -h to see command-line options. License pitchfork is copyright 2022 Shopify Inc and all contributors. It is based on Unicorn 6.1.0. Unicorn is copyright 2009-2018 by all contributors (see logs in git). It is based on Mongrel 1.1.5. Mongrel is copyright 2007 Zed A. Shaw and contributors. pitchfork is licensed under the GPLv2 or later or Ruby (1.8)-specific terms. See the included LICENSE file for details. Thanks Thanks to Eric Wong and all Unicorn and Mongrel contributors over the years. Pitchfork would have been much harder to implement otherwise. Thanks to Will Jordan who implemented Puma's "fork worker" experimental feature which have been a significant inspiration for Pitchfork. Thanks to Peter Bui for letting us use the pitchfork name on Rubygems. About No description, website, or topics provided. Resources Readme License Unknown, GPL-3.0 licenses found Licenses found Unknown LICENSE GPL-3.0 COPYING Code of conduct Code of conduct Stars 343 stars Watchers 128 watching Forks 7 forks Releases 1 tags Packages 0 No packages published Contributors 6 * @casperisfine * @paarthmadan * @byroot * @dylanahsmith * @sci-phi * @olimart Languages * Ruby 56.7% * C 28.4% * Ragel 8.0% * Shell 6.9% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.