🚀 Feature Request: Allow multiple workers to listen on different ports when started at the same time #13295
Replies: 6 comments
-
|
I have exactly similar case and now I need to make a tradeoff of either being able to have RPC with Durable Objects, but the endpoints provided by secondary workers unavailable, or then I can run everything in separate dev instances but can't use RPC. |
Beta Was this translation helpful? Give feedback.
-
|
You can configure ports in wrangler.jsonc. Make sure to also have an inspector_port for debug. "dev": {
"port": 8000,
"inspector_port": 9000
} |
Beta Was this translation helpful? Give feedback.
-
|
@mgandolfi7 thanks for that help, but it doesn't fix the issue I have :) |
Beta Was this translation helpful? Give feedback.
-
|
The combination of this single listener port limitation with no service binding support across multiple Running locally with DOs already means 2 wrangler.json files per worker. This dual limitation makes it impossible to actually run a non-trivial system locally. Hoping for a solution to either this or #9432 soon. 🙏 |
Beta Was this translation helpful? Give feedback.
-
|
This might be solvable by #12550 |
Beta Was this translation helpful? Give feedback.
-
|
I think that #12600 solves the ability to use DOs across multiple Wranglers, so that should resolve this, right? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the solution
wrangler allows us to start multiple workers with
wrangler dev -c ... -c .... This is great, however only the first worker will listen on a port to handle incoming requests. It would be great if we can maybe configure a port inwrangler.jsoncfile, and thenwrangler devcan listen on multiple ports and let the correct worker handle the request.I do have the requirement to use one command to start multiple workers, because otherwise it doesn't support durable objects or workflows with cross-script calling setup, see: https://discord.com/channels/595317990191398933/1296923707792560189/1347818297856360478
There are also workarounds to build your own local worker, which routes requests, but I feel it would be much easier if we just listen on multiple ports see: https://discord.com/channels/595317990191398933/799437470004412476/1337995421749870613
Beta Was this translation helpful? Give feedback.
All reactions