feat: Enable per-component restart and update within workloads#221
feat: Enable per-component restart and update within workloads#221Aditya1404Sal wants to merge 7 commits intowasmCloud:mainfrom
Conversation
8feaa12 to
cbdf8a8
Compare
Signed-off-by: Aditya <aditya.salunkh919@gmail.com>
Signed-off-by: Aditya <aditya.salunkh919@gmail.com>
cbdf8a8 to
254aa35
Compare
…ndler cache to reload component chain Signed-off-by: Aditya <aditya.salunkh919@gmail.com>
Signed-off-by: Aditya <aditya.salunkh919@gmail.com>
Signed-off-by: Aditya <aditya.salunkh919@gmail.com>
|
I don't think we'd want this behaviour at the protobuf / clustered level. maybe at the wash engine level only ⚖️ ( for embedding / wash dev ). Following Kubernetes / distributed-systems principles, "Restarts" are "Redeploys" by design for a few key reasons:
This "update-in-place" behavior is present in wasmcloud v1 + wadm and caused many outages / deploy issues and latency due to extra wrpc/nats layer. |
Signed-off-by: Aditya <aditya.salunkh919@gmail.com>
|
I agree with @lxfontes here. However, what if you have a workload consisting of components A and B. Component A changes a lot, so you have to redeploy your workload. But component B does not change a lot, which gives an overhead of redeploying component B as well. Would it then be wise to separate the components into two workloads and let component A and B communicate through wasmcloud/messaging? |
646481e to
5604816
Compare
…l component updates Introduce synchronization primitives and test coverage so component updates wait for in-flight requests to drain and queued requests are held until the component returns to Running. Signed-off-by: Aditya <aditya.salunkh919@gmail.com>
5604816 to
56366a1
Compare
|
Introducing wasmcloud messaging would be interesting if you need queue / durability / separate scaling needs for each component. Regarding overhead between workload update vs workload re-creation: It is mostly "OCI fetch / wasm decode" related, which goes away once we have |
|
This repository has been merged into wasmCloud/wasmCloud. Please re-open this PR against wasmCloud/wasmCloud:main. |
1 similar comment
|
This repository has been merged into wasmCloud/wasmCloud. Please re-open this PR against wasmCloud/wasmCloud:main. |
Feature or Problem
This PR adds component-level lifecycle management to the wasmcloud runtime, enabling granular control over individual components within a workload without requiring full workload restarts. Previously, any component update or state change required restarting the entire workload, causing unnecessary downtime for unaffected components.
Key capabilities added:
workload_updateautomatically detects which components changed and updates only thoseRelated Issues
Release Information
nextConsumer Impact
Breaking Changes: None - this is a backwards-compatible addition.
API Additions:
WorkloadStartRequestnow accepts optionalcomponent_idsfilter to start specific componentsWorkloadStopRequestnow accepts optionalcomponent_idsfilter to stop specific componentsWorkloadUpdateRequestadded - takes aWorkloadspec and updates only changed componentsWorkloadStatusResponsenow includesComponentInfolist with per-component state (id, name, state, message)Componenttype now has optionalnamefield for stable identificationRuntime Behavior Changes:
component_idsremain in memory withStoppedstate (can be restarted quickly)Testing
Unit Test(s)
None
Acceptance or Integration
Will commit soon
Manual Verification
tested it in an integration test setup, locally