Global edge key-value store with sub-millisecond reads.
RaidFrame KV is a globally distributed key-value store optimized for low-latency reads. Data is replicated to edge locations worldwide. Reads resolve in under 1ms from the nearest PoP.
rf add kv
✓ KV Store provisioned
✓ KV_URL injected into environment
✓ KV_TOKEN injected
import { KV } from "@raidframe/sdk";
const kv = new KV();
// Set a value
await kv.set("user:u_123:plan", "pro");
// Set with TTL
await kv.set("session:abc", JSON.stringify(sessionData), { ttl: 3600 });
// Get a value
const plan = await kv.get("user:u_123:plan");
// Delete
await kv.delete("session:abc");
// List keys by prefix
const sessions = await kv.list({ prefix: "session:" });
// Atomic increment
const count = await kv.incr("api:rate:192.168.1.1");
from raidframe import KV
kv = KV()
kv.set("feature:dark-mode", "true")
enabled = kv.get("feature:dark-mode")
KV uses eventual consistency with a propagation time of under 500ms globally. Writes go to the primary region and replicate to all edge locations.
For use cases requiring strong consistency (e.g., counters), use the consistent flag:
// Eventually consistent read (fast, from nearest edge)
const value = await kv.get("key");
// Strongly consistent read (slower, from primary region)
const value = await kv.get("key", { consistent: true });
# Set a value
rf kv set feature:dark-mode true
# Get a value
rf kv get feature:dark-mode
# List keys
rf kv list --prefix "feature:"
# Delete
rf kv delete feature:dark-mode
# Bulk import from JSON
rf kv import ./flags.json
kv:
flags:
type: kv
regions: all # Replicate to all edge locations
default_ttl: 0 # No expiry by default
max_value_size: 100KB
| Plan | Reads/mo | Writes/mo | Storage | Price |
|---|---|---|---|---|
| Starter | 100K | 10K | 100 MB | Free |
| Standard | 10M | 1M | 1 GB | $10/mo |
| Pro | 100M | 10M | 10 GB | $30/mo |