You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/kv/examples/distributed-configuration-with-workers-kv.mdx
+46-46Lines changed: 46 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
---
2
2
type: example
3
3
summary: Use Workers KV to as a geo-distributed, low-latency configuration store for your Workers application
4
-
tags:
5
-
- KV
6
4
pcx_content_type: configuration
7
5
title: Build a distributed configuration store
8
6
sidebar:
@@ -19,7 +17,7 @@ In this example, application configuration data is used to personalize the Worke
19
17
## Write your configuration from your external application to Workers KV
20
18
21
19
In some cases, your source-of-truth for your configuration data may be stored elsewhere than Workers KV.
22
-
If this is the case, use the Workers KV REST API to write the configuration data to your Workers KV namespace.
20
+
If this is the case, use the Workers KV REST API to write the configuration data to your Workers KV namespace.
23
21
24
22
The following external Node.js application demonstrates a simple scripts that reads user data from a database and writes it to Workers KV using the REST API library.
@@ -225,7 +225,7 @@ This code will use the path within the URL and find the file associated to the p
225
225
226
226
## Optimize performance for configuration
227
227
228
-
To optimize performance, you may opt to consolidate values in fewer key-value pairs. By doing so, you may benefit from higher caching efficiency and lower latency.
228
+
To optimize performance, you may opt to consolidate values in fewer key-value pairs. By doing so, you may benefit from higher caching efficiency and lower latency.
229
229
230
230
For example, instead of storing each user's configuration in a separate key-value pair, you may store all users' configurations in a single key-value pair. This approach may be suitable for use-cases where the configuration data is small and can be easily managed in a single key-value pair (the [size limit for a Workers KV value is 25 MiB](/kv/platform/limits/)).
Copy file name to clipboardExpand all lines: src/content/docs/kv/examples/routing-with-workers-kv.mdx
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
---
2
2
type: example
3
3
summary: Store routing data in Workers KV to route requests across various web servers with Workers
4
-
tags:
5
-
- KV
6
4
pcx_content_type: configuration
7
5
title: Route requests across various web servers
8
6
sidebar:
@@ -16,7 +14,6 @@ Using Workers KV to store routing data to route requests across various web serv
16
14
17
15
Routing can be helpful to route requests coming into a single Cloudflare Worker application to different web servers based on the request's path, hostname, or other request attributes.
18
16
19
-
20
17
In single-tenant applications, this can be used to route requests to various origin servers based on the business domain (for example, requests to `/admin` routed to administration server, `/store` routed to storefront server, `/api` routed to the API server).
21
18
22
19
In multi-tenant applications, requests can be routed to the tenant's respective origin resources (for example, requests to `tenantA.your-worker-hostname.com` routed to server for Tenant A, `tenantB.your-worker-hostname.com` routed to server for Tenant B).
@@ -142,7 +139,6 @@ In this example, the Cloudflare Worker receives a request and extracts the store
142
139
The storefront ID is used to look up the origin server URL from Workers KV using the `get()` method.
143
140
The request is then forwarded to the origin server, and the response is modified to include custom headers before being returned to the client.
144
141
145
-
146
142
## Related resources
147
143
148
144
- [Rust support in Workers](/workers/languages/rust/).
Copy file name to clipboardExpand all lines: src/content/docs/style-guide/frontmatter/tags.mdx
+12-3Lines changed: 12 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ import { TagsUsage } from "~/components";
6
6
7
7
Tags are currently used to filter content in the [`ExternalResources`](/style-guide/components/external-resources/), [`ProductsByTag`](/style-guide/components/products-by-tag/) and the [`ResourcesBySelector`](/style-guide/components/resources-by-selector/) components.
8
8
9
-
## Examples
9
+
## Example
10
10
11
11
```mdx
12
12
---
@@ -17,6 +17,15 @@ tags:
17
17
---
18
18
```
19
19
20
-
## Tags
20
+
## Allowed tags and where they are being used
21
21
22
-
<TagsUsage />
22
+
Tags are validated against an allowlist in [`/src/schemas/tags.ts`](https://github.com/cloudflare/cloudflare-docs/blob/production/src/schemas/tags.ts) which defines the user-facing representation (`label`) and any associated variants.
23
+
24
+
The matching is case-insensitive. For example, all of the following values are accepted in the `tags` frontmatter array and will be transformed into `Node.js`:
0 commit comments