Skip to content

Increase resilience and simplify the implementation #4

@fed135

Description

@fed135

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions