{"id":13411601,"url":"https://github.com/Shopify/pitchfork","last_synced_at":"2025-03-14T17:30:58.443Z","repository":{"id":60847587,"uuid":"537409787","full_name":"Shopify/pitchfork","owner":"Shopify","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-06T15:02:08.000Z","size":6667,"stargazers_count":743,"open_issues_count":8,"forks_count":23,"subscribers_count":174,"default_branch":"master","last_synced_at":"2025-03-07T02:46:07.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shopify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-16T10:27:47.000Z","updated_at":"2025-03-07T01:06:33.000Z","dependencies_parsed_at":"2023-02-16T08:15:44.822Z","dependency_job_id":"08605532-f3ab-452e-a3dd-f84ef038e720","html_url":"https://github.com/Shopify/pitchfork","commit_stats":{"total_commits":2712,"total_committers":57,"mean_commits":"47.578947368421055","dds":0.5014749262536873,"last_synced_commit":"891ff14be4a901c45d7295aef7f7a6cc89d571b6"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fpitchfork","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fpitchfork/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fpitchfork/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shopify%2Fpitchfork/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shopify","download_url":"https://codeload.github.com/Shopify/pitchfork/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243618636,"owners_count":20320269,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:14.894Z","updated_at":"2025-03-14T17:30:58.436Z","avatar_url":"https://github.com/Shopify.png","language":"Ruby","readme":"# pitchfork: Rack HTTP server for shared-nothing architecture\n\n`pitchfork` is a preforking HTTP server for Rack applications designed\nto minimize memory usage by maximizing Copy-on-Write performance.\n\nLike [`unicorn`](https://yhbt.net/unicorn/README.html) (of which `pitchfork` is a derivative), it is designed to\nonly serve fast clients on low-latency, high-bandwidth connections and take\nadvantage of features in Unix/Unix-like kernels. Slow clients should\nonly be served by placing a reverse proxy capable of fully buffering\nboth the request and response in between `pitchfork` and slow clients.\n\n## Features\n\n* Designed for Rack, Linux, fast clients, and ease-of-debugging. We\n  cut out everything that is better supported by the operating system,\n  [nginx](https://nginx.org/) or [Rack](https://rack.github.io/).\n\n* Shared-Nothing architecture: workers all run within their own isolated\n  address space and only serve one client at a time for maximum performance\n  and robustness. Concurrent requests don't need to compete for the GVL,\n  or impact each other's latency when triggering garbage collection.\n  It also does not care if your application is thread-safe or not.\n\n* Reforking: `pitchfork` can be configured to periodically promote a warmed-up worker\n  as the new template from which workers are forked. This dramatically improves\n  the proportion of shared memory, making processes use only marginally more\n  memory than threads would.\n\n* Compatible with Ruby 2.5.0 and later.\n\n* Process management: `pitchfork` will reap and restart workers that\n  die from broken apps. There is no need to manage multiple processes\n  or ports yourself. `pitchfork` can spawn and manage any number of\n  worker processes you choose to scale your backend to.\n\n* Adaptative timeout: request timeouts can be extended dynamically on a\n  per-request basis, which allows you to keep a strict overall timeout for\n  most endpoints, but allow a few endpoints to take longer.\n\n* Load balancing is done entirely by the operating system kernel.\n  Requests never pile up behind a busy worker process.\n\n## When to Use\n\nPitchfork isn't inherently better than other Ruby application servers; it mostly\nfocuses on different tradeoffs.\n\nIf you are fine with your current server, it's best to stick with it.\n\nIf there is a problem you are trying to solve, please read the\n[migration guide](docs/WHY_MIGRATE.md) first.\n\n## Requirements\n\nRuby(MRI) Version 2.5 or above.\n\n`pitchfork` can be used on any Unix-like system, however the reforking\nfeature requires `PR_SET_CHILD_SUBREAPER` which is a Linux 3.4 (May 2012) feature.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"pitchfork\"\n```\n\nAnd then execute:\n\n```bash\n$ bundle install\n```\n\nOr install it yourself as:\n\n```\n$ gem install pitchfork\n```\n\n## Usage\n\n### Rack\n\nIn your application root directory, run:\n\n```bash\n$ bundle exec pitchfork\n```\n\n`pitchfork` will bind to all interfaces on TCP port 8080 by default.\nYou may use the `--listen` switch to bind to a different\naddress:port or a UNIX socket.\n\n### Configuration File(s)\n\n`pitchfork` will look for the config.ru file used by rackup in `APP_ROOT`.\n\nFor deployments, it can use a config file for pitchfork-specific options\nspecified by the `--config-file/-c` command-line switch.\nSee the [configuration documentation](docs/CONFIGURATION.md) for the syntax\nof the pitchfork-specific options.\n\nThe default settings are designed for maximum out-of-the-box\ncompatibility with existing applications.\n\nMost command-line options for other Rack applications (above) are also\nsupported.  Run `pitchfork -h` to see command-line options.\n\n## Relation to Unicorn\n\nPitchfork initially started as a Unicorn patch, however some Unicorn features\nas well as the Unicorn policy of supporting extremely old Ruby version made it challenging.\n\nForking was the occasion to significantly reduce the complexity.\n\nHowever some large parts of Pitchfork like the HTTP parser are still mostly unchanged from Unicorn, and Unicorn\nis fairly stable these days. As such we aim to backport any Unicorn patches that may apply to Pitchfork and vice versa.\n\n## License\n\npitchfork is copyright 2022 Shopify Inc and all contributors.\nIt is based on Unicorn 6.1.0.\n\nUnicorn is copyright 2009-2018 by all contributors (see logs in git).\nIt is based on Mongrel 1.1.5.\nMongrel is copyright 2007 Zed A. Shaw and contributors.\n\npitchfork is licensed under the GPLv2 or later or Ruby (1.8)-specific terms.\nSee the included LICENSE file for details.\n\n## Thanks\n\nThanks to Eric Wong and all Unicorn and Mongrel contributors over the years.\nPitchfork would have been much harder to implement otherwise.\n\nThanks to Will Jordan who implemented Puma's \"fork worker\" experimental feature\nwhich has been a significant inspiration for Pitchfork.\n\nThanks to Peter Bui for letting us use the `pitchfork` name on Rubygems.\n","funding_links":[],"categories":["Ruby","Performances"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShopify%2Fpitchfork","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FShopify%2Fpitchfork","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FShopify%2Fpitchfork/lists"}