aws-samples / aws-samples/eb-node-express-sample
Increase resilience and simplify the implementation
- 主要言語
- EJS
- スター
- 279
- フォーク
- 247
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I have a suggestion to improve the resilience and align a bit more with industry standards.
You should **not** be doing clustering in your code. I adds noise and is right now preventing the script from running unclustered. There are pretty sweet tools to manage your process, bring it back up when it crashes, monitor it and finally cluster it. Tools like [PM2](https://github.com/Unitech/pm2)
What I suggest is to:
- add the `pm2` dependency to the `package.json`
- remove the clustering logic from `app.js`
- change the `npm start` command for `pm2 start app.js -i max` where `max` can easily be changed to any number to define the number of clusters to make.
PM2 also has the advantage to be hookable for remote monitoring with almost no effort, which could be interesting for this project.
Cheers
コントリビューションガイド
調査の方向性
まず package.json と app.js を読んで、現在の start コマンドとクラスタリングのロジックを理解します。要求されている PM2 の設定を既存のプロセス動作と比較し、その後、npm start で指定どおりにサンプルが起動し、クラスタリングが app.js で処理されなくなっていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- express, node.js
- 領域
- backend, devops
- issue の種類
- リファクタリング
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100