-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Workers for Platforms docs: Improved dispatch Worker description #19232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workers for Platforms docs: Improved dispatch Worker description #19232
Conversation
0b7ed15 to
678cb5d
Compare
irvinebroque
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love the use cases
| ### 4. Create a dynamic dispatch Worker | ||
|
|
||
| [Dispatch Workers](/cloudflare-for-platforms/workers-for-platforms/reference/how-workers-for-platforms-works/#dynamic-dispatch-worker) are used to execute user Workers from the dispatch namespace. You will now create a dispatch Worker and add logic it needs to route to the user Worker created in step 2. | ||
| A [dynamic dispatch Worker](/cloudflare-for-platforms/workers-for-platforms/reference/how-workers-for-platforms-works/#dynamic-dispatch-worker) is a specialized routing Worker that directs incoming requests to the appropriate user Workers in your dispatch namespace. Instead of using traditional route mappings, dispatch Workers let you programmatically control request routing through code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
traditional route mappings
just link to Workers routes?
https://developers.cloudflare.com/workers/configuration/routing/routes/
5302cf4 to
2c2fb0e
Compare
| ``` | ||
|
|
||
| ### 4. Create a dispatch Worker | ||
| ### 4. Create a dynamic dispatch Worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never loved this "dispatch Worker" phrasing. It makes it seem like this Worker is special, when it really isn't, and I've seen that confuse users a few times now. This is just a regular Worker which happens to have a WfP namespace binding. I can choose to call a user Worker in that namespace, possibly with a request over fetch. But I don't have to, and it's not like I concede everything over to it when I do so. I can do other stuff before and after calling it! I can do RPC!
It's fine in a guide specifically about how to create a hosting platform where this request-delegation is the pattern, but using it as the "getting started" guide for all of Workers for Platforms does WfP a disservice, imo. It doesn't very accurately portray a setup for hosted bots, or LLM-authored script isolation/tool calling or anything like that.
src/content/docs/cloudflare-for-platforms/workers-for-platforms/get-started/configuration.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/cloudflare-for-platforms/workers-for-platforms/get-started/configuration.mdx
Outdated
Show resolved
Hide resolved
src/content/docs/cloudflare-for-platforms/workers-for-platforms/get-started/configuration.mdx
Outdated
Show resolved
Hide resolved
…s/get-started/configuration.mdx Co-authored-by: Denise Peña <[email protected]>
…s/get-started/configuration.mdx Co-authored-by: Denise Peña <[email protected]>
…s/get-started/configuration.mdx Co-authored-by: Denise Peña <[email protected]>
|
Congratulations @dinasaur404, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cm67xr61m39620cjmbx58d5k6 This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
Summary
Updated documentation to include dynamic dispatch Worker description and use cases.
Screenshots (optional)
Documentation checklist