fn0 was inspired by Cloudflare Workers. Thank you Cloudflare!
fn0 is a FaaS platform powered by wasmtime that executes users' wasm-compiled code.
fn0 pronounced as f-n-zero.
- Any program that can be built into Wasm (WASI 0.2 - Component Model) can run on fn0.
- You can easily run the server in a local development environment using the CLI.
- You can run the fn0 platform on various cloud providers using Adapters.
- Instead of managing the platform yourself, you can conveniently use fn0 Cloud, a managed service.
This limits are for fn0 Cloud. If you run fn0 on your own, you can remove these limits.
- Request
- Header: 128 KB
- Body: 100 MB
- Response
- Header: 128 KB
- Body: Unlimited
- Memory: 128 MB
- CPU Time: 10 ms
- Duration: 15 secs
- Subrequests: 50 requests
- Subrequests are external internet requests.
- Rust
- JavaScript, TypeScript (without Node.js compatibility)
- Server Side Rendering (SSR)
- Image Resizing
- Rest API Server
- Amazon Web Service (AWS)
- Oracle Cloud Infrastructure (OCI)
- Cloudflare
- File System (Including NFS like AWS EFS)
- S3 and compatible storages
- Multi-thread
- Please use async/await instead of multi-threading.
- It would be supported in the future with WASI Shared Everything Threads.
- Monolith architecture
- Load Balancing and Auto Scaling is provided by the cloud provider.
- When instance started, it runs Cloud Provider's Instance Discovery API to bootstrap, then use membership to form a cluster.
- On user request;
- Instance finds two warmed up instances and forwards the request to less loaded instance.
- If forwarding is rejected, instance trys one more time.
- When instance rejected again or No warmed up instances, instance trys to find proper instance to run the request with cold-start.
- Instance can start on itself if it has enough resources.
- If all instance is loaded, instance returns 503 Service Unavailable. And this should not happen under normal conditions. Must monitor this condition and alert to developers.
- Execution on Instnace;
- If instance doesn't have request's module, instance downloads module from Database.
- Or instance checks module's last modified time and downloads if it's updated.
- Instance instantiates module and runs it.
- Instance keeps wasm instance in memory cache for warm-start.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL v3). If you want to use this software for proprietary commercial purposes without the open-source obligations (e.g., keeping your source code closed), you can purchase a Commercial License. Please contact us at projectluda@gmail.com for licensing inquiries.
