1
0
mirror of synced 2025-12-29 09:04:39 -05:00

Implement app clustering (#17752)

* Install throng for easy cluster management
* Extract the Express app construction into its own file
* Switch server.js to use app clustering for deployed environments
* Worker count is based on the lesser of process.env.WEB_CONCURRENCY and the count of CPUs
* Reading clustered output is difficult, let's prefix the std{out,err} streams

Co-authored-by: Jason Etcovitch <jasonetco@github.com>
This commit is contained in:
James M. Greene
2021-03-19 15:07:46 -05:00
committed by GitHub
parent b6321bba15
commit 6e20ed7927
12 changed files with 161 additions and 40 deletions

View File

@@ -3,7 +3,8 @@
"env": {
"NODE_ENV": "production",
"NPM_CONFIG_PRODUCTION": "true",
"ENABLED_LANGUAGES": "en"
"ENABLED_LANGUAGES": "en",
"WEB_CONCURRENCY": "1"
},
"buildpacks": [
{ "url": "heroku/nodejs" }