k-v.io
A DNS-based Key-Value Store.
Quick Start
In the following examples, my-key is the key, and my-value is the value.
- To set a key:
dig put.my-value.my-key.k-v.io txt +short - To get a key:
dig my-key.k-v.io txt +short - To delete a key:
dig delete.my-key.k-v.io txt +short
Notes:
- Values are stored as TXT records.
- Keys must be valid DNS subdomains, i.e. only alphanumerics and dashes, and cannot exceed 63 characters. "my-key" is valid, but "my#key" is not.
- Values can be one or more subdomains, i.e. alphanumerics, dashes, and dots. For example,
dig put.3.14159.pi.k-v.io txt +shortsets the the key "pi" to the value "3.14159". - If you need special characters ("!@#$%^😊"), consider Base32 encoding, but remember that the padding character ("=") is illegal.
- The three verbs are
put,get, anddelete, e.g.dig delete.pi.k-v.io txt +short. - The verb
getis the default verb:dig pi.k-v.io txt +shortis identical todig get.pi.k-v.io txt +short. - When you change or delete a key, it may take up to 3 minutes for the change to propagate due to DNS caching.
- There's no security: you may set the key "best-rugby-team" to the value "all-blacks", and someone else could change it a minute later to "springboks".
- If you don't want someone to mess with your keys, you should probably use GUIDs or something fairly unique
as a key, e.g.
dig put.my-value.df616686-26e8-4da8-8104-a24aa0196bc7.k-v.io txt +short - There are three servers that back this service: two in the USA, one in Singapore, on different platforms: AWS, Azure, and Google Cloud.
- The underlying key-value store is an etcd cluster. I chose etcd for no particular reason other than that's what Kubernetes uses.
- I have no idea how well this system will scale.
- I'll probably expire keys that haven't been accessed in a month, but I haven't written that code yet.
- This project is very much in beta. Assume you may lose your keys at any time.