-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[draft]proposal: run services on wasm #610
Comments
What's the differences between a "nano-service" and a "function"? |
Looks like they are quite similar concepts. |
This proposal is an idea for discussion. We need some ideas on "what's the next step of layotto+ wasm" :)
A service is "a group of functions" , like a pod is a group of containers. For example:
|
Sounds like
How about |
Do you mean aws step function ? I didn't know it. Let me learn and play it :P |
This is a good proposal. As said in the community meeting yesterday, whether it is an independent faas model or a nano-service model, I think both have great practical business value. As we all know, the former has many practical applications, such as Alibaba Cloud Function Compute. The latter will have higher practical value in search, recommendation, advertising and other businesses that require large-scale resources. However, when it comes to resource isolation, I personally think that it is relatively certain that each wasm must have a certain degree of isolation, because it is necessary to ensure overall security and stability. But for the resource problem of each layotto, in other words, how many layotto should a node deploy, more precisely in one or more ways such as container runtime, deamonset, microservice framework, etc., I think we need discuss further. |
This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue or help wanted. Thank you for your contributions. |
I just found that cloudflare open sourced their serverless runtime project "workerd" . They call their abstraction "nanoservice" too. Interesting 😆 https://github.com/cloudflare/workerd |
I propose that we compile micro-services into wasm modules and run them on wasm runtime.
These services should be smaller than traditional micro-services. Maybe we can call them "nano-service".
We can assume that there's only one Layotto on one node:
How to "shrink to zero" when no request comes
Layotto runtime should monitor the workload of every wasm module. If the workload of service 2 decrease to zero, wasm runtime should offload the wasm module, or "swap the module to disk", so that the module won't consume memory.
The offload mechanism should be transparent to K8s. In k8s view, there's still a service 2 running on this node.
How to "cold start" when new request comes
If new requests come after "swapping to disk", Layotto runtime should:
How to "scale out" on one node
a. Raise the resource limits of service 2
b. Load another service_2.wasm
How to "scale out" to run service 2 on more nodes
Layotto should report metrics of service 2 to K8s, and it's K8s' business to decide whether to scale out to a new node.
Milestones
At first ,we can run another preview service on wasm
The text was updated successfully, but these errors were encountered: