Workers KV - Theoretical Limits

I have theoretical question about something that doesn’t makes any sense to me :slight_smile:

Per documentation and blog posts, we know that after beta, we will have following limits:

Up to 20 Namespaces per account
Up to 1 billion keys per Namespace
Keys of up to 2 kB
Values of up to 64 kB

So, theoretical maximum allowed size for per account is:
(2+64) * 1,000,000,000 * 20 / 1024 / 1024 = 1,258,850 GB :thinking:

It will cost $629,425 monthly and someone might think that it’s expensive for ~1.2 PB, but in reality it’s crazy cheap and this is what doesn’t makes sense to me…

We know that after adding/updating key, it’s replicated in every Cloudfare datacenter (currently 154!!!) in less than 30 seconds. We have to pay $0.5/m per GB and this might sounds expensive until you realize that if you count replicas, you actually pay $0.5 per 154 GB which makes actual price of per GB ~$0.003 and this is insane… It’s too good to be true and doesn’t makes sense with current storage pricing :thinking:

My question is that if someone actually reach this limits, will Cloudflare allow this?
~184 PB (including replicas) per account for $629K per month?

I have an idea which depends on heavy KV store usage, I don’t think it will ever reach 1.2 PB in size but I want to know if there will be any bottleneck in advance :slight_smile:

1 Like

Sorry, my bad… I didn’t read part of the documentation which explains this situation

“only reaching its full performance when data is being frequently read. Very infrequently read values are stored centrally, while more popular values are maintained in all of our data centers around the world.”

Now it makes much more sense :slight_smile:

Although, I have new question now… What is the location of this central storage for infrequent access keys? Is it in the US or there is multiple central locations as well? For example if we have to provide data from infrequent key to customer in Germany, reading this data from Chicago datacenter will make overall experience slower.


Only from my experience with KV in production (I have implemented a failover since is not GA!), the core includes Europe AMS :netherlands: FRA :de: PoPs.

You should have a great response time in Germany.

I have seen an Opportunistic behaviour in LIS :portugal: MAD :es: PoPs

This is only from my experience, possibly Cloudflare implementation is different!

1 Like