Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-configuration-placement-workflow-guide.mdDocumentation 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.textA 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.textA 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.textA 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-.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/configuration/placement