Cloudflare ties Workers to distributed data storage
Client and server, meet 'originless' apps
Content delivery biz Cloudflare on Friday added distributed key-value storage to its Workers service, making a greater range of network-hosted applications possible.
Workers can be used to develop applications using the Serverless Framework or HashCorp's Terraform, which enables infrastructure automation, among other things.
Workers KV, available in beta, is a distributed, eventually consistent key-value store, intended to provide low-latency transactions at the network's edge instead of time-consuming trips to a central database.
In database-speak, eventual consistency means that for some period of time, different queries may get different values for a given key in a distributed datastore, until the data can be made consistent – for Workers KV, global consistency requires 10 seconds.
It's a consequence of prioritizing availability over data uniformity and it isn't suitable for applications that require ACID guarantees. It's not the sort of thing you'd want handling millions of rapid-fire financial transactions, for example.
Sick of bandwidth gouging? Cloudflare,
Google, Microsoft, IBM have some good news
But for other applications, it could prove appealing, assuming they suit the service's performance characteristics: Workers KV allows up to 1 billion keys per namespace, at up to 2kB per key and 64kB per value. The data store allows 100,000+ reads per second for each key and up to one write per second per key.
"It makes it possible to build entire applications with the performance traditionally associated with static content cached by a CDN," said product manager Stephen Pinkerton and director of product strategy Zack Bloom in a blog post.
The Cloudflare pair suggest Workers and its KV database might make a nice low-latency, low-cost API Gateway – 1/7th the cost of Amazon's API Gateway, they claim. The service could also be useful for serving localized content efficiently or cloud-based functions, they say.
Workers costs $5 per month per domain, which includes 10 million Worker-driven requests to the associated domain, with additional requests billed at $0.50 per million.
That fee includes Workers KV, for up to 1 GB of KV storage and up to 10 million KV reads, with unused Worker requests going toward extra KV usage as needed. After that, Workers KV costs $0.50 per GB-month of extra storage and $0.50 per million additional KV reads. ®