<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Docker | 锤子前端</title><description>Now vibe coding, so learning hammer FE ?</description><link>https://channel.meo-ai.com</link><item><title>《我们将 Node.js 内存占用减少了一半》</title><link>https://channel.meo-ai.com/posts/562</link><guid isPermaLink="true">https://channel.meo-ai.com/posts/562</guid><pubDate>Fri, 20 Feb 2026 08:07:13 GMT</pubDate><content:encoded>&lt;span class=&quot;post-title-source&quot;&gt;《我们将 Node.js 内存占用减少了一半》&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;标签：&lt;a href=&quot;/search/result?q=%23%E5%90%8E%E7%AB%AF&quot; title=&quot;#后端&quot;&gt;#后端&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Node&quot; title=&quot;#Node&quot;&gt;#Node&lt;/a&gt;.js &lt;a href=&quot;/search/result?q=%23V8&quot; title=&quot;#V8&quot;&gt;#V8&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96&quot; title=&quot;#性能优化&quot;&gt;#性能优化&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23%E5%86%85%E5%AD%98%E7%AE%A1%E7%90%86&quot; title=&quot;#内存管理&quot;&gt;#内存管理&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23Docker&quot; title=&quot;#Docker&quot;&gt;#Docker&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;本文介绍了通过启用 V8 引擎的指针压缩（Pointer Compression）技术，在不修改代码的情况下将 Node.js 应用内存占用减少约 50%，且仅带来 2-4% 的平均延迟开销，同时显著降低 P99 延迟。Cloudflare 与 Igalia 合作解决了历史性的&quot;4GB 内存笼&quot;限制，使每个 Worker 线程拥有独立的 4GB 压缩内存空间。&lt;br /&gt;&lt;br /&gt;文章要点：&lt;br /&gt;- 技术原理：指针压缩将 64 位指针转为 32 位偏移量，使每个指针从 8 字节减至 4 字节，内存占用减半，代价是每次堆访问需额外的加减法运算&lt;br /&gt;- 历史障碍：此前 Node.js 未默认启用是因所有 Worker 线程共享单一 4GB 内存空间，2024 年 Cloudflare 与 Igalia 合作推出 IsolateGroups 功能，使每个 V8 实例拥有独立的 4GB 压缩内存笼&lt;br /&gt;- 实验结果：在 Next.js 电商应用基准测试中，指针压缩实现内存减半（2GB→1GB），平均延迟仅增加 2.5-4.2%，但 P99 延迟降低 7-43%，最大延迟降低 6-38%，因更小的堆减少了 GC 暂停时间&lt;br /&gt;- 业务价值：可显著降低 Kubernetes 集群成本、提升多租户 SaaS 密度、支持边缘计算部署、增加 WebSocket 并发连接数&lt;br /&gt;- 兼容性限制：每个 V8 实例仍受 4GB 堆内存限制；使用旧版 NAN 的原生插件不兼容，但 Node-API 插件不受影响&lt;br /&gt;- 使用方式：通过 &lt;code&gt;platformatic/node-caged&lt;/code&gt; &lt;mark class=&quot;highlight&quot;&gt;Docker&lt;/mark&gt; 镜像一键替换官方 Node.js 镜像即可启用&lt;br /&gt;&lt;br /&gt;链接：&lt;a href=&quot;https://blog.platformatic.dev/we-cut-nodejs-memory-in-half&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;https://blog.platformatic.dev/we-cut-nodejs-memory-in-half&quot;&gt;https://blog.platformatic.dev/we-cut-nodejs-memory-in-half&lt;/a&gt;</content:encoded></item><item><title>#文章 #React 「如何 Docker 化 React 应用程序：开发人员分步指南」从 #Docker 基础入手，逐步指导创建Dockerfile、构建和运行Docker镜像，以及将镜像发布到Docker Hub</title><link>https://channel.meo-ai.com/posts/122</link><guid isPermaLink="true">https://channel.meo-ai.com/posts/122</guid><pubDate>Thu, 12 Dec 2024 06:25:20 GMT</pubDate><content:encoded>&lt;a href=&quot;/search/result?q=%23%E6%96%87%E7%AB%A0&quot; title=&quot;#文章&quot;&gt;#文章&lt;/a&gt; &lt;a href=&quot;/search/result?q=%23React&quot; title=&quot;#React&quot;&gt;#React&lt;/a&gt; 「&lt;a href=&quot;https://www.docker.com/blog/how-to-dockerize-react-app/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;如何 Docker 化 React 应用程序：开发人员分步指南&quot;&gt;如何 &lt;mark class=&quot;highlight&quot;&gt;Docker&lt;/mark&gt; 化 React 应用程序：开发人员分步指南&lt;/a&gt;」从 &lt;a href=&quot;/search/result?q=%23Docker&quot; title=&quot;#Docker&quot;&gt;#Docker&lt;/a&gt; 基础入手，逐步指导创建Dockerfile、构建和运行Docker镜像，以及将镜像发布到Docker Hub。&lt;a class=&quot;tgme_widget_message_link_preview&quot; href=&quot;https://docker.com/blog/how-to-dockerize-react-app&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; title=&quot;We show how to dockerize a React app to streamline your development process, eliminate &amp;quot;it works on my machine&amp;quot; problems, and ensure seamless deployments.&quot;&gt;
  
  &lt;div class=&quot;link_preview_site_name accent_color&quot;&gt;Docker&lt;/div&gt;
  &lt;img class=&quot;link_preview_image&quot; alt=&quot;How to Dockerize a React App: A Step-by-Step Guide for Developers | Docker&quot; src=&quot;/static/https://cdn4.telesco.pe/file/JQ3NwAUsDzfyIVuB1sXsOyYJo-i46JbO6dPuoXszs0RjEfcNwTjwTw3PKIBmxFG77TjNpnGpzgZoFUhF3LqsYvki98aNmz140eqda-ulVLxVxoeb0caXdnKDKsmDIXeH_eQ55V0rROOaU7Y9fNUECAkaV16KYIovWh53HI9y2dQL8hdPHAUn6N_xskXdGboSIW7pJuPWcMbCKuXodpxqaETsq3lg3AxGomHdAntbeChy_9h-JNai28r7EXxmihw1h69WBiL2eyWEWMs1gBp-BXrFytf7aqiGvK1xk0rZoFKYh7-rD4dzg9pf2WJNyFLCpUr3ANM_XEt7hGbi0xVIdw.jpg&quot; width=&quot;1200&quot; height=&quot;630&quot; loading=&quot;eager&quot; /&gt;
  &lt;div class=&quot;link_preview_title&quot;&gt;How to Dockerize a React App: A Step-by-Step Guide for Developers | &lt;mark class=&quot;highlight&quot;&gt;Docker&lt;/mark&gt;&lt;/div&gt;
  &lt;div class=&quot;link_preview_description&quot;&gt;We show how to dockerize a React app to streamline your development process, eliminate &quot;it works on my machine&quot; problems, and ensure seamless deployments.&lt;/div&gt;
&lt;/a&gt;</content:encoded></item></channel></rss>