Skip to content

doc: remove unadvisable cluster example - #41668

Merged
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
tniessen:doc-cluster-dangerous-example
Jan 25, 2022
Merged

doc: remove unadvisable cluster example#41668
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
tniessen:doc-cluster-dangerous-example

Conversation

@tniessen

Copy link
Copy Markdown
Member

Applications should usually keep track of workers themselves to prevent cross-referencing workers from different "groups" that are assigned to separate tasks.

Additionally, it is unreasonable to assume that the 'data' event emitted by a socket object will be an integer. While the example works when the argument is a string (or Buffer), it can result in various issues (e.g., when id === '__proto__' since cluster.workers has a non-null prototype).

Refs: 5f08c3c

Applications should usually keep track of workers themselves to prevent
cross-referencing workers from different "groups" that are assigned to
separate tasks.
Additionally, it is unreasonable to assume that the 'data' event emitted
by a socket object will be an integer. While the example works when the
argument is a string (or Buffer), it can result in various issues (e.g.,
when id === '__proto__' since cluster.workers has a non-null prototype).
Refs: nodejs@5f08c3c
@nodejs-github-botnodejs-github-bot added cluster Issues and PRs related to the cluster subsystem. doc Issues and PRs related to the documentations. labels Jan 23, 2022
@targostargos added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 24, 2022
bnb
bnb approved these changes Jan 25, 2022
@tniessentniessen added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 25, 2022
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 25, 2022
@nodejs-github-bot
nodejs-github-bot merged commit 6fc6ba7 into nodejs:masterJan 25, 2022
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 6fc6ba7

ruyadorno pushed a commit that referenced this pull request Feb 8, 2022
Applications should usually keep track of workers themselves to prevent
cross-referencing workers from different "groups" that are assigned to
separate tasks.
Additionally, it is unreasonable to assume that the 'data' event emitted
by a socket object will be an integer. While the example works when the
argument is a string (or Buffer), it can result in various issues (e.g.,
when id === '__proto__' since cluster.workers has a non-null prototype).
Refs: 5f08c3c
PR-URL: #41668
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
@ruyadornoruyadorno mentioned this pull request Feb 8, 2022
danielleadams pushed a commit that referenced this pull request Mar 2, 2022
Applications should usually keep track of workers themselves to prevent
cross-referencing workers from different "groups" that are assigned to
separate tasks.
Additionally, it is unreasonable to assume that the 'data' event emitted
by a socket object will be an integer. While the example works when the
argument is a string (or Buffer), it can result in various issues (e.g.,
when id === '__proto__' since cluster.workers has a non-null prototype).
Refs: 5f08c3c
PR-URL: #41668
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
danielleadams pushed a commit that referenced this pull request Mar 3, 2022
Applications should usually keep track of workers themselves to prevent
cross-referencing workers from different "groups" that are assigned to
separate tasks.
Additionally, it is unreasonable to assume that the 'data' event emitted
by a socket object will be an integer. While the example works when the
argument is a string (or Buffer), it can result in various issues (e.g.,
when id === '__proto__' since cluster.workers has a non-null prototype).
Refs: 5f08c3c
PR-URL: #41668
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
danielleadams pushed a commit that referenced this pull request Mar 14, 2022
Applications should usually keep track of workers themselves to prevent
cross-referencing workers from different "groups" that are assigned to
separate tasks.
Additionally, it is unreasonable to assume that the 'data' event emitted
by a socket object will be an integer. While the example works when the
argument is a string (or Buffer), it can result in various issues (e.g.,
when id === '__proto__' since cluster.workers has a non-null prototype).
Refs: 5f08c3c
PR-URL: #41668
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.clusterIssues and PRs related to the cluster subsystem.docIssues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@tniessen@nodejs-github-bot@bnb@Trott@benjamingr@cjihrig@Mesteery@targos