Skip to content

Sandbox building block: isolated microVMs addressed as Dapr actors - #111

Draft
XavierGeerinck wants to merge 2 commits into
dapr:mainfrom
XavierGeerinck:sandbox-building-block
Draft

XavierGeerinck wants to merge 2 commits into
dapr:mainfrom
XavierGeerinck:sandbox-building-block

Conversation

@XavierGeerinck

Copy link
Copy Markdown

Refs #110

This PR adds a proposal for an alpha Sandbox building block. A sandbox ID is an internal Dapr actor hosted by daprd, the way workflow actors are. Its VM comes from a pluggable sandbox component (driver) behind a gRPC contract that does not depend on any one VMM. The first call for an unknown ID gets a VM from a warm pool, restores one from a template snapshot, or boots one.

What's in this PR

  • 20261029-BRCS-sandbox-building-block.md: the proposal, following templates/proposal.md.
  • resources/20261029-BRCS-sandbox-building-block/: the benchmark's report and rate-sweep chart for each of the four result sets.

Proof of concept

Headline result: kind on a bare-metal Linux host with KVM

The benchmark measures a new sandbox ID's first command, from the caller's sidecar receiving the request to it sending the response. Every call crosses pods. With a warm pool, the p99 was:

Load p99 Requests
One after another 16.44 ms the 482 of 500 served from the pool; the other 18 were served by a restore
20 new sandboxes/s per host pod (40/s in total) 11.36 ms 3600, all from the pool, 0 errors

Caveats:

  • The same deployment on kind inside a VM on macOS (nested virtualization) fails the gate. The proposal shows that result and explains why.
  • Above about 20 new sandboxes/s per pod, warm-pool refill becomes the limit, not Dapr.

Feedback wanted

  • Whether this belongs in Dapr as a building block.
  • The hosting model: internal actors in the host app's daprd.
  • The driver contract.
  • The cross-app access change for sandbox actors under mTLS, which needs a security review.

Draft: I'll keep refining the text from review feedback.

🤖 Generated with Claude Code

XavierGeerinck and others added 2 commits October 29, 2026 15:17
Adds 20261029-BRCS-sandbox-building-block.md: an alpha Sandbox building
block where sandbox IDs are internal Dapr actors backed by a pluggable
microVM driver. Result summaries and rate-sweep charts from the proof of
concept are under resources/20261029-BRCS-sandbox-building-block/.

Refs dapr#110

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Xavier Geerinck <xavier.geerinck@gmail.com>
The PoC's final review fixed: no re-run of a command cut short by
actor rebalancing; DELETE ends a running command; a 60 s Acquire bound;
the no-isolation process driver is opt-in; an mTLS integration test
for the cross-app ACL change. Known gaps are listed in the PoC repo.

Refs dapr#110

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Xavier Geerinck <xavier.geerinck@gmail.com>
@cicoyle

cicoyle commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Hi @XavierGeerinck! Thanks for the proposal 🎉 just wanted to mention that we will be planning to review this over the next week and discuss it during our next Tuesday release meeting which is fully open to the community to join - if you would like to join in on the discussion here is a link: https://discord.com/events/778680217417809931/1566919280426229901/1569758537318400000

Ping me on discord cassie1coyle if that link does not work.

@XavierGeerinck

Copy link
Copy Markdown
Author

Hi @cicoyle thanks for the update! I couldn't make this one, but definitely let me know if you were able to review this and if anything is needed from my end. Still looking for much forward to getting this contributed.

@JeffreyJPZ

JeffreyJPZ commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Hey @XavierGeerinck, I'm interested in this idea coming from the Dapr Agents side (I actually kinda brushed up against this idea here dapr/dapr-agents#939 (comment)). There I was mainly thinking of an integration specifically with Agent Substrate, but I think having that as a component could be interesting. Is anything preventing a sandbox actor from essentially "proxying" a Substrate actor, in other words, is there anything preventing this from generalizing to any compatible sandbox provider? One benefit I could see is allowing Dapr and non-Dapr applications to more easily share the same underlying infra (so it wouldn't need to speak the Dapr sandbox protocol exactly), and one downside I can think of is extra hops but I'm mainly focused on long-running ambient agents that need a persistent sandbox (which would map to the "flexible profile" in #110).

If this seems useful I could try to make a PoC with Agent Substrate, at the very least it could explore some of the known limitations in #110.

@WhitWaldo

WhitWaldo commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

@XavierGeerinck We talked about this on this week's release call. Given the scope and breadth of the idea, I think it might be better built out in an experimental capacity in the Dapr Sandbox and then ported into the runtime once the scope and shape of it are better understood.

I'm working to get a repository created over there to host it in - is this something you'd be interested in taking the lead on building out (so I might get the appropriate permissions set up)?

@XavierGeerinck

Copy link
Copy Markdown
Author

@WhitWaldo sounds good, please get it setup and I can help on getting the PR moved there, definitely willing to help get it started and lead, would love a formalized timeline though as we are in need of it internally as well.
@JeffreyJPZ this definitely ties into Dapr Agents as well, I designed it as "underlying" at the moment as we would be using it as well for Functions for example (they need to run securely and isolated in their own runtimes) so it should be multi-purpose. Another use case for sure is Agent Sandboxing. I was thinking there of creating it "on-top" as an additional component, although I think the component itself might suffice as well as it stands.

As for Agent Substrate, I am not sure if we need integration with this (looking at the broader Dapr team as well) seeing that Dapr has its actor manager. This MicroVM Buildig block would be a VM Manager on top of that, thus creating a VM Substrate through Actors which I think might be very similar. Dapr could however benefit from similar visualizations.

@JeffreyJPZ

Copy link
Copy Markdown
Member

This MicroVM Buildig block would be a VM Manager on top of that, thus creating a VM Substrate through Actors which I think might be very similar.

100% agree on that, I was mostly just wondering whether this could/should be flexible enough to support both paradigms (Dapr-native and Dapr as an adapter/"thin wrapper" around an external orchestrator like Substrate), but this is all just theoretical so it may be less useful without some concrete need. Either way I'll keep an eye on how this evolves.

@WhitWaldo

Copy link
Copy Markdown
Contributor

@XavierGeerinck I don't know if I'll hear back while KubeCon is happening this week, but I'll certainly ping you here when I've got that repo live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants