我们将 Chrome 检查点保存到 NVMe 并在 500 毫秒内恢复。
1 分•作者: Nextbysam•5 个月前
我们一直在为 AI 智能体构建浏览器基础设施。 每个人都会遇到的问题是:你启动 Chrome,登录一些东西,做一些工作,然后呢?
让虚拟机以每月 30 美元的价格空闲运行,或者关闭它并丢失会话。
我们希望在 Chrome 空闲时将其冻结到磁盘,并在需要时将其恢复到原来的状态。 事实证明这很难。 经过大量尝试,使用了不同的浏览器构建和配置后,我们通过在 Orb Cloud 上使用 Playwright 的 Chromium 和 CRIU 实现了这一目标。
结果是:导航到 Google,获取一些 cookie,截取一个屏幕截图,冻结。 等待。 恢复。 相同的 cookie,相同的页面,相同的屏幕截图。 我们在 Google、维基百科和 Hacker News 上进行了连续测试——全部通过。
Orb-browser 是开源代码库。 这是一个可以休眠的无头 Chrome 浏览器。 休眠时无需付费,唤醒时间约为 500 毫秒,并且所有内容都完好无损——cookie、localStorage、你所在的页面。 浏览器并不知道它被冻结了。
如果你运行的浏览器智能体每小时活跃 5 分钟,你只需支付 5 分钟的费用,而不是 60 分钟。
代码库:https://github.com/nextbysam/orb-browser
查看原文
We've been building browser infrastructure for AI agents. The problem everyone hits: you spin up Chrome, log into something, do some work, and then what?<p>Keep the VM running at $30/month doing nothing, or kill it and lose the session.<p>We wanted to freeze Chrome to disk when it's idle and bring it back exactly where it left off. Turns out this is hard. After a lot of trial and error with different browser builds and configurations, we got it working with Playwright's Chromium on Orb Cloud using CRIU.<p>The result: navigate to Google, pick up some cookies, take a screenshot, freeze. Wait. Restore. Same cookies, same page, identical screenshot. We ran it back-to-back on Google, Wikipedia, and Hacker News — all pass.<p>Orb-browser is the open source repo. It's a headless Chrome you can put to sleep. It costs nothing while sleeping, wakes in ~500ms, and everything is intact — cookies, localStorage, the page you were on. The browser doesn't know it was frozen.<p>If you're running browser agents that are active 5 minutes per hour, you pay for 5 minutes, not 60.<p>repo: https://github.com/nextbysam/orb-browser.