NATS
Key-Value Commands
Use NATS JetStream as a distributed key-value store. Store configuration, feature flags, and session data with built-in history, TTL, and watch capabilities.
9 commands
Pro Tips
Create a bucket: 'nats kv add CONFIG --history 5 --ttl 24h' with revision history and auto-expiry.
Watch for changes: 'nats kv watch CONFIG' streams all key updates in real-time.
Use 'nats kv get CONFIG key --revision 2' to read a specific historical version of a key.
Common Mistakes
KV buckets are backed by JetStream streams. Storage limits on the stream affect your KV capacity.
TTL applies to all keys in a bucket. You can't set per-key TTL — use separate buckets for different lifetimes.