Periodic CPU spikes caused by default `healthcheck.js` in Node-RED Docker image
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- docker, javascript, node.js
- Domain
- devops, infrastructure, performance
Research direction
Start by locating the default healthcheck.js and the Docker image configuration that runs it every 30 seconds. Compare the current node /healthcheck.js check with the lightweight alternatives described in the issue, and verify that the chosen healthcheck still confirms service availability while avoiding the reported periodic CPU spike.
Written by the indexing model from the issue text.
Description
Periodic CPU spikes caused by default healthcheck in Node-RED Docker image
I recently tried to deliver a Node-RED Docker container to a colleague who is not very familiar with Node-RED and is quite cautious about trusting it in production.
During testing, he noticed a periodic CPU spike every 30 seconds, where CPU usage briefly jumps from ~0.5% to ~6% within less than a second.
After investigation, I found the cause is the default healthcheck.js. The Docker healthcheck executes every 30 seconds and runs node /healthcheck.js, which starts a full Node.js process and performs an HTTP request to check service availability.
While this design is functionally correct, it introduces unnecessary CPU overhead in lightweight or single-node deployments.
I would like to suggest considering a more lightweight healthcheck approach, such as a TCP port check or a lightweight HTTP probe, instead of starting a full Node.js process (node /healthcheck.js) on every check.
- Dominant language
- Shell
- Stars
- 540
- Forks
- 434
- Avg merge
- 24m
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from node-red/node-red-docker
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
node-red/node-red-docker#536 ·
-
node-red/node-red-docker#522 · 1 assignee ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
node-red/node-red-docker#510 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
node-red/node-red-docker#493 · 13 comments ·
-
needs more info
Difficulty 4/5 3-5 days Newbie friendliness 25/100
node-red/node-red-docker#459 · 4 comments ·
All issues in node-red/node-red-docker
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
community-scripts/ProxmoxVE#17425 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·
-
agent-research-recommend agent-review-finding
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jordansmall/spindrift#3714 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
conda-forge/python-feedstock#934 ·