Periodic CPU spikes caused by default `healthcheck.js` in Node-RED Docker image
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- docker, javascript, node.js
调研方向
首先定位默认的 healthcheck.js,以及每 30 秒运行一次它的 Docker 镜像配置。将当前的 node /healthcheck.js 检查与 issue 中描述的轻量级替代方案进行比较,并验证所选的 healthcheck 仍能确认服务可用性,同时避免报告的周期性 CPU 峰值。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Shell
- 星标
- 540
- 派生
- 434
- 平均合并
- 24 分钟
- 30 天内合并 PR
- 5
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
node-red/node-red-docker 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
node-red/node-red-docker#536 ·
-
node-red/node-red-docker#522 · 已指派 1 人 ·
-
难度 2/5 1-3 小时 新手友好度 55/100
node-red/node-red-docker#510 ·
-
难度 4/5 3-5 天 新手友好度 30/100
node-red/node-red-docker#493 · 13 条评论 ·
-
needs more info
难度 4/5 3-5 天 新手友好度 25/100
node-red/node-red-docker#459 · 4 条评论 ·
查看 node-red/node-red-docker 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
community-scripts/ProxmoxVE#17396 · 1 条评论 ·
-
package-update
难度 2/5 1-3 小时 新手友好度 78/100
oSoWoSo/vOid_Community_repOsitory#144 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
help wanted new command
难度 2/5 1-3 小时 新手友好度 72/100
tldr-pages/tldr#24151 ·
-
PacReq: Rune IDE 未关闭package request
难度 2/5 1-3 小时 新手友好度 68/100
pacstall/pacstall-programs#9402 ·