cloudflare · Cloudflare Workers Docs
Workers Placement
Teaches how to optimize Worker latency by configuring execution locations using Smart Placement, specific regions, or host-based placement to minimize roundtrip time to backend services.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Placement
Teaches how to optimize Worker latency by configuring execution locations using Smart Placement, specific regions, or host-based placement to minimize roundtrip time to backend services.
When To Use
Use when you need to reduce latency between a Cloudflare Worker and backend databases or APIs by controlling where the Worker code executes.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-configuration-placement-workflow-guide.md | Documentation explaining how Cloudflare Workers and Pages Functions handle execution placement and how to enable Smart Placement to optimize latency to backend infrastructure. | Questions about documentation explaining how Cloudflare Workers and Pages Functions handle execution placement and how to enable Smar... |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati.text | A text configuration example demonstrating the different placement modes including smart, region, and host options for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A text configuration example demonstrating the different placement modes including smart, region, and host options fo... |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-2.text | A text representation of the placement configuration syntax including smart mode, region, host, and hostname parameters. | Exact payloads, commands, or snippets shown in A text representation of the placement configuration syntax including smart mode, region, host, and hostname parameters. |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-3.text | A JSON configuration object demonstrating the placement mode settings for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A JSON configuration object demonstrating the placement mode settings for Cloudflare Workers. |
examples/workers-configuration-placement-cloudflare-workers-placement-smart-mode-.text | A text configuration example demonstrating the use of the smart placement mode for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A text configuration example demonstrating the use of the smart placement mode for Cloudflare Workers. |
examples/workers-configuration-placement-cloudflare-workers-placement-get-service.text | A curl command to retrieve worker service placement details via the Cloudflare API. | Exact payloads, commands, or snippets shown in A curl command to retrieve worker service placement details via the Cloudflare API. |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-4.text | A JSON configuration object demonstrating how to specify explicit cloud regions for Workers placement using AWS and GCP identifiers. | Exact payloads, commands, or snippets shown in A JSON configuration object demonstrating how to specify explicit cloud regions for Workers placement using AWS and G... |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-5.text | A text example demonstrating the syntax for defining specific placement regions within a Cloudflare Workers configuration. | Exact payloads, commands, or snippets shown in A text example demonstrating the syntax for defining specific placement regions within a Cloudflare Workers configura... |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-6.text | A configuration object demonstrating how to specify a host for TCP layer 4 proximity-based Worker placement. | Exact payloads, commands, or snippets shown in A configuration object demonstrating how to specify a host for TCP layer 4 proximity-based Worker placement. |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-7.text | A text configuration snippet demonstrating the syntax for defining a placement host in a Cloudflare Workers configuration file. | Exact payloads, commands, or snippets shown in A text configuration snippet demonstrating the syntax for defining a placement host in a Cloudflare Workers configura... |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-8.text | A JSON configuration object demonstrating how to use the placement property to route Workers based on a specific hostname. | Exact payloads, commands, or snippets shown in A JSON configuration object demonstrating how to use the placement property to route Workers based on a specific host... |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-9.text | A text configuration example demonstrating the use of the placement directive within a Cloudflare Workers configuration file. | Exact payloads, commands, or snippets shown in A text configuration example demonstrating the use of the placement directive within a Cloudflare Workers configurati... |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-10.text | A JSON configuration object defining service bindings and worker placement settings for a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A JSON configuration object defining service bindings and worker placement settings for a Cloudflare Worker. |
examples/workers-configuration-placement-cloudflare-workers-placement-toml-config.text | A TOML configuration snippet demonstrating the services binding and placement settings for a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A TOML configuration snippet demonstrating the services binding and placement settings for a Cloudflare Worker. |
examples/workers-configuration-placement-cloudflare-workers-placement-service-bin.text | A TypeScript code example demonstrating how to use service bindings to route requests between Cloudflare Workers. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use service bindings to route requests between Cloudflare Workers. |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-11.text | A configuration object demonstrating smart and regional placement modes for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A configuration object demonstrating smart and regional placement modes for Cloudflare Workers. |
examples/workers-configuration-placement-cloudflare-workers-placement-configurati-12.text | A configuration snippet demonstrating how to specify a worker's placement using the region attribute in a wrangler configuration file. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to specify a worker's placement using the region attribute in a wrangler co... |
examples/workers-configuration-placement-cloudflare-workers-placement-workerentry.text | A TypeScript code example demonstrating how to use the WorkerEntrypoint class to manage worker placement and database proximity. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to use the WorkerEntrypoint class to manage worker placement and database... |
examples/workers-configuration-placement-cloudflare-workers-placement-durable-obj.text | A TypeScript code example demonstrating how to colocate compute and data using Durable Objects within Cloudflare Workers. | Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to colocate compute and data using Durable Objects within Cloudflare Work... |
What This Skill Covers
- By default, Workers and Pages Functions run in a data center closest to where the request was received. If your Worker makes requests to back-end infrastruct...
- Main sections:
Understand placement,Enable Smart Placement,Review limitations,Enable smart placement,Configure with Wrangler.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/configuration/placement
