-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update production best practices #1679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for expressjscom-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
4133f2f
to
0b2aeca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the changes, but I think that we need to have a good agreement on this (cc: @expressjs/express-tc )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an improvement for sure. Great work @bjohansebas!
I think we probably need to re-think the role our docs play in the ecosystem. Best practices have evolved quite a bit since this was all written, and it will evolve again in the coming years. We probably don't want to be the source for too much content like this unless we are able to keep it updated.
That said, for now, I am very much in support of improving this type of doc so LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops forgot to change it to approve
…sjs.com into update-performance-info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick proof read
Co-authored-by: Dustin Popp <dustinpopp@ibm.com>
Co-authored-by: Dustin Popp <dustinpopp@ibm.com>
Please update the following link in the Cache Request Results section: https://www.nginx.com/resources/wiki/start/topics/examples/reverseproxycachingexample/ it is invalid and redirects to https://docs.nginx.com/ Maybe replace it with: https://blog.nginx.org/blog/nginx-caching-guide |
…sjs.com into update-performance-info
Looks like we have approvals and have resolved the concerns. The merge block now is just rebasing I think. EDIT: oh wait, I jus read @Phillip9587's comment. Seems like a good last minute change. EDIT 2: lol, commented while the update was being pushed! |
Oh yeah, we should never remove others reviews. I saw a yellow "comment" review in the sidebar but missed that there was still a previous "change requested" review that was blocking and hidden in the collapsed comments. |
|
||
As explained below, when you install StrongLoop PM as an operating system service using your init system, it will automatically restart when the system restarts. Thus, it will keep your application processes and clusters alive forever. | ||
Historically, it was popular to use a Node.js process manager like [PM2](https://github.com/Unitech/pm2). See their documentation if you wish to do this. However, modern best practices have changed, and we now recommend using your system's init for process management |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this was suggested by @wesleytodd, but this seems... slightly heavy-handed (?), and at least could be worded better (using your init system
vs using your system's init
, for example. Do we really want to take a position of saying using pm2 is not a "best practice"? If that's the case (which I am challenging here), then we shouldn't even be mentioning pm2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would require rewriting a large part where PM2 was mentioned, so removing it is not an option at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to take a position of saying using pm2 is not a "best practice"?
Clearly IMO yes lol, but I fully understand your reasoning for being hesitant. Having used basically all variants at different points of my career, I can comfortably say that operating system process management is always better. And even if you use pm2
you nearly certainly have to also use your OS process manager to kick off pm2
, so why make it more complicated?
then we shouldn't even be mentioning pm2.
This is what I would prefer, but I thought that was a larger change from our existing docs.
at least could be worded better (using your init system vs using your system's init, for example.
That's a good change, I didn't really spend a ton of time on that suggestion, my bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can dedicate another PR to removing PM2, but for now, I changed the wording to the suggestion that Chris proposed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ctcpip, do you consider this resolved?
Co-authored-by: Chris de Almeida <ctcpip@users.noreply.github.com>
…sjs.com into update-performance-info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing to approved since we have a plan to address all the things I was concerned about in future PRs.
Co-authored-by: Chris de Almeida <ctcpip@users.noreply.github.com>
Co-authored-by: Chris de Almeida <ctcpip@users.noreply.github.com> Co-authored-by: Phillip Barta <barta.phillip@gmail.com> Co-authored-by: Dustin Popp <dustinpopp@ibm.com>
Modernize this page by making the following changes: