From 8da13250d605eb37045b0381e37b1ba39a798e4d Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Thu, 9 Jan 2025 14:43:37 +0000 Subject: [PATCH 1/8] Setting up one large FAQ page. --- src/content/docs/kv/faq.mdx | 44 ++++++++++++++++++++++++ src/content/docs/kv/platform/pricing.mdx | 15 -------- 2 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 src/content/docs/kv/faq.mdx diff --git a/src/content/docs/kv/faq.mdx b/src/content/docs/kv/faq.mdx new file mode 100644 index 000000000000000..44d62c4629c151d --- /dev/null +++ b/src/content/docs/kv/faq.mdx @@ -0,0 +1,44 @@ +--- +title: FAQ +pcx_content_type: faq +sidebar: + order: 8 + +--- + +import { Glossary } from "~/components" + +Frequently asked questions regarding Workers KV. + +### General + +#### Can I use Workers KV without using Workers? + +Yes, you can use Workers KV outside of Workers by using the [REST API](/api/resources/kv/) or the associated Cloudflare SDKs for the REST API. It is important to note the [limits of the REST API](/fundamentals/api/reference/limits/) that apply. + +#### Why can I not immediately see the updated value of a key-value pair? + +Workers KV heavily caches data across the Cloudflare network. Therefore, it is possible that you read a cached value for up to the cache TTL duration. + +#### Is KV eventually consistent or strongly consistent? + +Workers KV stores data in central stores and replicates the data to all Cloudflare locations through a hybrid push/pull replication approach. This means that the previous value of the key-value pair may be seen in a location for as long as the cache TTL. + +This means that KV is eventually consistent. + +Refer to [How KV works](/kv/concepts/how-kv-works/). + +### Pricing + +#### When writing via KV's [REST API](/api/resources/kv/subresources/namespaces/methods/bulk_update/), how are writes charged? + +Each key-value pair in the `PUT` request is counted as a single write, identical to how each call to `PUT` in the Workers API counts as a write. Writing 5,000 keys via the REST API incurs the same write costs as making 5,000 `PUT` calls in a Worker. + +#### Do queries I issue from the dashboard or wrangler (the CLI) count as billable usage? + +Yes, any operations via the Cloudflare dashboard or wrangler, including updating (writing) keys, deleting keys, and listing the keys in a namespace count as billable KV usage. + +#### Does Workers KV charge for data transfer / egress? + +No. + diff --git a/src/content/docs/kv/platform/pricing.mdx b/src/content/docs/kv/platform/pricing.mdx index 21b88259adda7ab..2ac045250e38c50 100644 --- a/src/content/docs/kv/platform/pricing.mdx +++ b/src/content/docs/kv/platform/pricing.mdx @@ -10,18 +10,3 @@ import { Render } from "~/components" -## Frequently Asked Questions - -Frequently asked questions related to KV pricing: - -* When writing via KV's [REST API](/api/resources/kv/subresources/namespaces/methods/bulk_update/), how are writes charged? - -Each key-value pair in the `PUT` request is counted as a single write, identical to how each call to `PUT` in the Workers API counts as a write. Writing 5,000 keys via the REST API incurs the same write costs as making 5,000 `PUT` calls in a Worker. - -* Do queries I issue from the dashboard or wrangler (the CLI) count as billable usage? - -Yes, any operations via the Cloudflare dashboard or wrangler, including updating (writing) keys, deleting keys, and listing the keys in a namespace count as billable KV usage. - -* Does Workers KV charge for data transfer / egress? - -No. From f407b05f766608ec5983303cc1dbfb5968b72343 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Thu, 9 Jan 2025 14:45:03 +0000 Subject: [PATCH 2/8] Directing to FAQ from pricing page. --- src/content/docs/kv/platform/pricing.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/content/docs/kv/platform/pricing.mdx b/src/content/docs/kv/platform/pricing.mdx index 2ac045250e38c50..9962f2e791d88c4 100644 --- a/src/content/docs/kv/platform/pricing.mdx +++ b/src/content/docs/kv/platform/pricing.mdx @@ -10,3 +10,6 @@ import { Render } from "~/components" +:::note +For FAQs on pricing, refer to the [pricing FAQs for Workers KV](/kv/faq/). +::: \ No newline at end of file From 9ec173d2efee9153605c5cddee4643916b7e8f59 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Thu, 9 Jan 2025 15:14:57 +0000 Subject: [PATCH 3/8] Making the link more specific. --- src/content/docs/kv/platform/pricing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/kv/platform/pricing.mdx b/src/content/docs/kv/platform/pricing.mdx index 9962f2e791d88c4..b6927ffc6a6570e 100644 --- a/src/content/docs/kv/platform/pricing.mdx +++ b/src/content/docs/kv/platform/pricing.mdx @@ -11,5 +11,5 @@ import { Render } from "~/components" :::note -For FAQs on pricing, refer to the [pricing FAQs for Workers KV](/kv/faq/). +For FAQs on pricing, refer to the [pricing FAQs for Workers KV](/kv/faq/#pricing). ::: \ No newline at end of file From 58851f60d514782be74632a5865e79a5c1d9c01a Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Thu, 9 Jan 2025 15:16:16 +0000 Subject: [PATCH 4/8] Moving up all the headers by 1. --- src/content/docs/kv/faq.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/content/docs/kv/faq.mdx b/src/content/docs/kv/faq.mdx index 44d62c4629c151d..60044c6901dc6cf 100644 --- a/src/content/docs/kv/faq.mdx +++ b/src/content/docs/kv/faq.mdx @@ -10,17 +10,17 @@ import { Glossary } from "~/components" Frequently asked questions regarding Workers KV. -### General +## General -#### Can I use Workers KV without using Workers? +### Can I use Workers KV without using Workers? Yes, you can use Workers KV outside of Workers by using the [REST API](/api/resources/kv/) or the associated Cloudflare SDKs for the REST API. It is important to note the [limits of the REST API](/fundamentals/api/reference/limits/) that apply. -#### Why can I not immediately see the updated value of a key-value pair? +### Why can I not immediately see the updated value of a key-value pair? Workers KV heavily caches data across the Cloudflare network. Therefore, it is possible that you read a cached value for up to the cache TTL duration. -#### Is KV eventually consistent or strongly consistent? +### Is KV eventually consistent or strongly consistent? Workers KV stores data in central stores and replicates the data to all Cloudflare locations through a hybrid push/pull replication approach. This means that the previous value of the key-value pair may be seen in a location for as long as the cache TTL. @@ -28,17 +28,17 @@ This means that KV is eventually consistent. Refer to [How KV works](/kv/concepts/how-kv-works/). -### Pricing +## Pricing -#### When writing via KV's [REST API](/api/resources/kv/subresources/namespaces/methods/bulk_update/), how are writes charged? +### When writing via KV's [REST API](/api/resources/kv/subresources/namespaces/methods/bulk_update/), how are writes charged? Each key-value pair in the `PUT` request is counted as a single write, identical to how each call to `PUT` in the Workers API counts as a write. Writing 5,000 keys via the REST API incurs the same write costs as making 5,000 `PUT` calls in a Worker. -#### Do queries I issue from the dashboard or wrangler (the CLI) count as billable usage? +### Do queries I issue from the dashboard or wrangler (the CLI) count as billable usage? Yes, any operations via the Cloudflare dashboard or wrangler, including updating (writing) keys, deleting keys, and listing the keys in a namespace count as billable KV usage. -#### Does Workers KV charge for data transfer / egress? +### Does Workers KV charge for data transfer / egress? No. From 71ae74b0f76f3b77c7558b8033d6bac886ea398d Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Fri, 10 Jan 2025 16:26:59 +0000 Subject: [PATCH 5/8] Adding back pricing FAQ directly under the pricing table. --- src/content/docs/kv/platform/pricing.mdx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/content/docs/kv/platform/pricing.mdx b/src/content/docs/kv/platform/pricing.mdx index b6927ffc6a6570e..e459392cead6283 100644 --- a/src/content/docs/kv/platform/pricing.mdx +++ b/src/content/docs/kv/platform/pricing.mdx @@ -10,6 +10,16 @@ import { Render } from "~/components" -:::note -For FAQs on pricing, refer to the [pricing FAQs for Workers KV](/kv/faq/#pricing). -::: \ No newline at end of file +## Pricing + +### When writing via KV's [REST API](/api/resources/kv/subresources/namespaces/methods/bulk_update/), how are writes charged? + +Each key-value pair in the `PUT` request is counted as a single write, identical to how each call to `PUT` in the Workers API counts as a write. Writing 5,000 keys via the REST API incurs the same write costs as making 5,000 `PUT` calls in a Worker. + +### Do queries I issue from the dashboard or wrangler (the CLI) count as billable usage? + +Yes, any operations via the Cloudflare dashboard or wrangler, including updating (writing) keys, deleting keys, and listing the keys in a namespace count as billable KV usage. + +### Does Workers KV charge for data transfer / egress? + +No. From 96f32507d6650a6e65464934ee8f4cb08943548f Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Fri, 10 Jan 2025 16:27:22 +0000 Subject: [PATCH 6/8] Adding FAQ directly under pricing table. --- src/content/docs/kv/platform/pricing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/kv/platform/pricing.mdx b/src/content/docs/kv/platform/pricing.mdx index e459392cead6283..3cc9401c2076e14 100644 --- a/src/content/docs/kv/platform/pricing.mdx +++ b/src/content/docs/kv/platform/pricing.mdx @@ -10,7 +10,7 @@ import { Render } from "~/components" -## Pricing +## Pricing FAQ ### When writing via KV's [REST API](/api/resources/kv/subresources/namespaces/methods/bulk_update/), how are writes charged? From f444f82d9387de416d72558789d7872d4f072038 Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Fri, 10 Jan 2025 17:01:41 +0000 Subject: [PATCH 7/8] Clarification improvements --- src/content/docs/kv/faq.mdx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/content/docs/kv/faq.mdx b/src/content/docs/kv/faq.mdx index 60044c6901dc6cf..c2065b0035d80df 100644 --- a/src/content/docs/kv/faq.mdx +++ b/src/content/docs/kv/faq.mdx @@ -20,25 +20,24 @@ Yes, you can use Workers KV outside of Workers by using the [REST API](/api/reso Workers KV heavily caches data across the Cloudflare network. Therefore, it is possible that you read a cached value for up to the cache TTL duration. -### Is KV eventually consistent or strongly consistent? +### Is Workers KV eventually consistent or strongly consistent? -Workers KV stores data in central stores and replicates the data to all Cloudflare locations through a hybrid push/pull replication approach. This means that the previous value of the key-value pair may be seen in a location for as long as the cache TTL. +Workers KV is eventually consistent. -This means that KV is eventually consistent. +Workers KV stores data in central stores and replicates the data to all Cloudflare locations through a hybrid push/pull replication approach. This means that the previous value of the key-value pair may be seen in a location for as long as the cache TTL. This means that Workers KV is eventually consistent. Refer to [How KV works](/kv/concepts/how-kv-works/). ## Pricing -### When writing via KV's [REST API](/api/resources/kv/subresources/namespaces/methods/bulk_update/), how are writes charged? +### When writing via Workers KV's [REST API](/api/resources/kv/subresources/namespaces/methods/bulk_update/), how are writes charged? Each key-value pair in the `PUT` request is counted as a single write, identical to how each call to `PUT` in the Workers API counts as a write. Writing 5,000 keys via the REST API incurs the same write costs as making 5,000 `PUT` calls in a Worker. ### Do queries I issue from the dashboard or wrangler (the CLI) count as billable usage? -Yes, any operations via the Cloudflare dashboard or wrangler, including updating (writing) keys, deleting keys, and listing the keys in a namespace count as billable KV usage. +Yes, any operations via the Cloudflare dashboard or wrangler, including updating (writing) keys, deleting keys, and listing the keys in a namespace count as billable Workers KV usage. ### Does Workers KV charge for data transfer / egress? No. - From a11644c0c4c890dce55b3b3ac4f7b71eb1a6f12a Mon Sep 17 00:00:00 2001 From: Jun Lee Date: Mon, 13 Jan 2025 14:47:45 +0000 Subject: [PATCH 8/8] Implementing TG feedback --- src/content/docs/kv/{ => reference}/faq.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename src/content/docs/kv/{ => reference}/faq.mdx (87%) diff --git a/src/content/docs/kv/faq.mdx b/src/content/docs/kv/reference/faq.mdx similarity index 87% rename from src/content/docs/kv/faq.mdx rename to src/content/docs/kv/reference/faq.mdx index c2065b0035d80df..25994e5ff6a93bc 100644 --- a/src/content/docs/kv/faq.mdx +++ b/src/content/docs/kv/reference/faq.mdx @@ -2,7 +2,7 @@ title: FAQ pcx_content_type: faq sidebar: - order: 8 + order: 10 --- @@ -18,13 +18,13 @@ Yes, you can use Workers KV outside of Workers by using the [REST API](/api/reso ### Why can I not immediately see the updated value of a key-value pair? -Workers KV heavily caches data across the Cloudflare network. Therefore, it is possible that you read a cached value for up to the cache TTL duration. +Workers KV heavily caches data across the Cloudflare network. Therefore, it is possible that you read a cached value for up to the [cache TTL](/kv/api/read-key-value-pairs/#cachettl-parameter) duration. ### Is Workers KV eventually consistent or strongly consistent? Workers KV is eventually consistent. -Workers KV stores data in central stores and replicates the data to all Cloudflare locations through a hybrid push/pull replication approach. This means that the previous value of the key-value pair may be seen in a location for as long as the cache TTL. This means that Workers KV is eventually consistent. +Workers KV stores data in central stores and replicates the data to all Cloudflare locations through a hybrid push/pull replication approach. This means that the previous value of the key-value pair may be seen in a location for as long as the [cache TTL](/kv/api/read-key-value-pairs/#cachettl-parameter). This means that Workers KV is eventually consistent. Refer to [How KV works](/kv/concepts/how-kv-works/).