Kedge: A Globally Distributed Cloud Platform with Forkable VM Snapshots and Global SQLite
Kedge provides a globally distributed infrastructure for full-stack applications
Kedge is a lightweight cloud platform designed to deploy static sites, serverless functions, and full-stack applications with integrated databases close to end-users. The platform distinguishes itself by combining hardware-isolated virtual machines (VMs) with the agility of serverless scaling and a built-in global data layer.
Core Infrastructure and Compute Model
Kedge utilizes secure, hardware-isolated VMs that run a full Linux kernel, providing stronger isolation than standard container runtimes. The platform is optimized for rapid deployment and scaling through the following mechanisms:
- Instant Sandboxes and Scale-out: Kedge employs VM snapshots to enable near-instantaneous scaling and the creation of sandboxes.
- Autoscaling to Zero: Instances are spun up close to users based on demand and automatically scale to zero when idle to minimize costs.
- Deployment Flexibility: Users can deploy via SSH (
echo '# Hello, world!' | ssh kedge.dev), Git, or HTTP APIs, with native GitHub integration for push-to-deploy and per-pull-request preview environments. - Network Services: The platform includes built-in CDN capabilities for caching static content at the edge, public HTTPS endpoints, private networking, and support for custom domains.
Integrated Global Data Layer
Unlike many cloud providers that treat database management as a separate orchestration task, Kedge integrates data persistence directly into the application environment:
- Global SQLite and Shared Filesystem: Every application has access to a built-in global SQLite database and a shared filesystem, facilitating distributed state across regions.
- Persistent Local Volumes: Local volumes are provided for high-performance storage and are continuously backed by object storage for durability.
Resource-Based Pricing Model
Kedge uses a per-second billing model based on actual resource consumption rather than allocated capacity. This approach ensures users only pay for the resources the application actively uses:
- CPU: Billed only for scheduled milliseconds ($15 / vCPU-month).
- Memory: Tracks active resident pages ($5 / GB-month).
- Storage: Billed only for bytes used ($0.05 / GB-month).
- Egress: Charged at $0.01 / GB.
A free tier of $5/month is available, which is sufficient for small websites or development environments.
Technical Community Insights and Considerations
Technical discussions around Kedge's architecture highlight several advanced considerations regarding its snapshotting and data replication models:
VM Snapshotting and Entropy
One critical technical concern involves the "fork boundary" of VM snapshots. Because snapshots are taken when a process calls listen, subsequent clones are identical memory images. This raises potential security and stability issues regarding entropy and Random Number Generation (RNG), as clones may share the same seed. Users have noted the need for post-restore reseed hooks to ensure unique cryptographic seeds across cloned instances.
Data Replication and Consistency
The implementation of the global SQLite database has prompted questions regarding write concurrency and the underlying engine. Specifically, users have inquired whether the system utilizes "syzy" (a CRDT-based approach) and how it handles multiple instances acting as writers simultaneously.
Comparison to Existing Platforms
Community members have compared Kedge's integrated approach to Fly.io, noting that while Fly provides the building blocks, Kedge integrates the replicated database and filesystem as first-class primitives, reducing the operational burden on the developer.