Repository navigation
fix(gateway): wake a sandbox on disk again - #385
Merged
Merged
Conversation
A sandbox on disk has no namespace, and its address falls on the node's unreachable floor, so a connection to it fails with "no route to host". The gateway took that as cold and woke it until #365, which woke only on a refusal; since then every request to a sandbox on disk was answered 502 at once and the sandbox was never woken. In the fleet's traffic runs that was 67-79% of requests, against 1-2.5% at 872682b. The gateway now wakes on a refusal or on no route (proxy::is_cold). The E2B front door keeps is_refused: there an unreachable address is a node that cannot be reached, not a sandbox asleep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WaylandYang
added a commit
that referenced
this pull request
Oct 30, 2026
…-30 results (#388) * bench: start times on the six 2-core, 2 GB nodes with the new build, replacing the one-VM table Every runtime started one at a time on each of six cloud nodes, the median of their p50s, drawn by bench/baremetal/charts.py. charts.py for the fleet now reads a round's layout from its builds.json, so a new round can be drawn without renaming its directories; 2026-10-28 draws unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(readme): badges as files in the repo, and the backend described as each node's own GitHub's image proxy would not show the shields.io badges with an embedded logo; the same SVGs are now in docs/assets/badges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(readme): shorter, one chart, and only numbers from this round The figures and tables measured before #376, #380 and #385 go, the capacity headline with them until the fills are rerun. bench/fleet/results/2026-10-30 holds the traffic, wake, herd and wall runs on the six nodes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(readme): console screenshots of the current console Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
落盘(Snapshot 档位)的沙箱收到请求时,gateway 直接回 502,沙箱再也不会被唤醒。
舰队流量测试(每节点 40 个 app64,1-8 req/s)里 67-79% 的请求失败,而 872682b 是 1-2.5%。
原因
落盘沙箱没有 namespace,它的地址落在节点的 unreachable 兜底路由上,连接返回
No route to host。872682b 的 gateway 遇到任何连接错误都会唤醒;#365 改成了只在ConnectionRefused时唤醒,这种情况就成了 502。net.rs的注释仍然写着 gateway 会把它当成冷沙箱,但没有测试覆盖。修复
新增
proxy::is_cold:refused(冻结沙箱,#327 的 REJECT)或没有路由(落盘沙箱)都算冷,gateway 全部改用它。E2B 入口(front.rs)保持is_refused:那里连的是节点,不可达说明节点有问题,不是沙箱睡着了。验证
a_sandbox_on_disk_is_cold。真实的"无路由"需要 root 才能造出来,所以测的是错误分类。snapshot档位后发请求,返回 200,152 ms,其中唤醒 138 ms。修复前同样的请求是 0.8 ms 的 502。🤖 Generated with Claude Code