You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@RealHarshThakur what are your multi-tenancy requirements? Is your cluster shared internally to your team, or actually available by customers? In other words how much do you trust your tenants, and how much do they trust each other?
It would be for customers so don't really trust people using it. Having noisy neighbors is something that is acceptable for the most part. A resource limit would be a safeguard against someone who's trying to consume all the infra resources for themselves.
@sipsma can comment further, but I don't believe buildkit can be safely used in a multi-tenant way if tenants don't trust each other. It's reasonably sandboxed, but I wouldn't bet a customer's data on that. For example we run our API playground on a shared buildkit, but are very clear with users that they should not use it for anything critical, and they should not upload sensitive credentials or assets either.
This doesn't invalidate the need limits to avoid noisy neighbour, since solving that problem is useful even between tenants that trust each other. But I thought it would be useful context nonetheless.
@mircubed#8800 is just about allowing configuring existing options that today are configured through a different mechanism - it doesn't yet add any additional controls (but when we do add them, we would do so through the new engine.json mechanism it introduces).
Oh, can you please expand more on that? What would be the attack surface? Some sort of cache reuse attacks?
Yeah, buildkit's cache isn't separated per incoming user - it's shared across an entire instance. Essentially, if you can predict the graphql that a user made, you can also fetch results that the user got.
I'd like to set resource limits to build calls made to Dagger API.
I do really like this idea generally though, I think we should do it. Even on a personal computer, it can be annoying when different jobs consume huge amounts of resources, and slows down my web browser or text editor - it would be nice to be able to easily cap it.
In the original discord thread, the WithCgroupParent was mentioned - I think that's probably the right place to start?
Not entirely what level of granularity we'd want - I think it probably makes sense for the client to set session-wide cgroup limits (we probably don't want modules to have that level of machine-specific granular control over their WithExecs, but maybe there's a use case).
In terms of how to configure it: I think we'd want something like #9007.
Activity
shykes commentedon Dec 15, 2022
@RealHarshThakur what are your multi-tenancy requirements? Is your cluster shared internally to your team, or actually available by customers? In other words how much do you trust your tenants, and how much do they trust each other?
RealHarshThakur commentedon Dec 15, 2022
It would be for customers so don't really trust people using it. Having noisy neighbors is something that is acceptable for the most part. A resource limit would be a safeguard against someone who's trying to consume all the infra resources for themselves.
shykes commentedon Dec 15, 2022
@sipsma can comment further, but I don't believe buildkit can be safely used in a multi-tenant way if tenants don't trust each other. It's reasonably sandboxed, but I wouldn't bet a customer's data on that. For example we run our API playground on a shared buildkit, but are very clear with users that they should not use it for anything critical, and they should not upload sensitive credentials or assets either.
This doesn't invalidate the need limits to avoid noisy neighbour, since solving that problem is useful even between tenants that trust each other. But I thought it would be useful context nonetheless.
RealHarshThakur commentedon Dec 15, 2022
Oh, can you please expand more on that? What would be the attack surface? Some sort of cache reuse attacks?
mircubed commentedon Nov 19, 2024
@jedevc does your PR solve this? #8800
We had a few commanders and a customer run into this issue.
jedevc commentedon Nov 20, 2024
@mircubed #8800 is just about allowing configuring existing options that today are configured through a different mechanism - it doesn't yet add any additional controls (but when we do add them, we would do so through the new
engine.jsonmechanism it introduces).Yeah, buildkit's cache isn't separated per incoming user - it's shared across an entire instance. Essentially, if you can predict the graphql that a user made, you can also fetch results that the user got.
I do really like this idea generally though, I think we should do it. Even on a personal computer, it can be annoying when different jobs consume huge amounts of resources, and slows down my web browser or text editor - it would be nice to be able to easily cap it.
jedevc commentedon Nov 20, 2024
In the original discord thread, the
WithCgroupParentwas mentioned - I think that's probably the right place to start?Not entirely what level of granularity we'd want - I think it probably makes sense for the client to set session-wide cgroup limits (we probably don't want modules to have that level of machine-specific granular control over their
WithExecs, but maybe there's a use case).In terms of how to configure it: I think we'd want something like #9007.