Hey! I would like to get some feedback. I have a new domain `example.com`, and I want a few workers

Hey! I would like to get some feedback. I have a new domain example.com, and I want a few workers to serve the content of my sites: - shop.example.com -> Remix app on worker - dashboard.example.com -> Remix app on worker - example.com/auth -> Remix app on worker - example.com/api -> workers REST API (hono.js) Question: Is it an okay practice to call one worker from another worker? I was thinking of calling example.com/api from the web app workers to create one source of truth for API calls. Is this generally an acceptable pattern, or should I just query d1 directly in each worker? Question: How do I point a worker to example.com/api? Also, I am a bit confused about how I could point a worker to example.com/api. This doesn't seem to be doable with a custom worker domain since it includes a pathname. But for a worker route to work, I must already proxy the domain through Cloudflare. I currently have no DNS records. How do I point example.com/api to the api worker script?
14 Replies
Hello, I’m Allie!
I built my own by mashing regexes from Matomo, but it wasn’t very efficient You might also be able to modify useragent to work without YAML
Bobai Kato
Bobai Kato10mo ago
We've hit the Worker Size limit and are encountering the following error. Any possibility of increasing this limit? Your assistance would be greatly appreciated. Thank you.
Error: Failed to publish your Function. Got error: Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)
Error: Failed to publish your Function. Got error: Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)
Cyb3r-Jak3
Cyb3r-Jak310mo ago
Workers paid plan goes up to 10 MiB.
Bobai Kato
Bobai Kato10mo ago
Fully aware. We can't afford the paid plan yet. We did fill this form and hoping for the best https://docs.google.com/forms/d/e/1FAIpQLSd_fwAVOboH9SlutMonzbhCxuuuOmiU1L_I5O2CFbXf_XXMRg/viewform
Google Docs
Cloudflare Developer Platform: Limit Increase Request Form
Want to increase the limits of your current plan? Let us know what your requirements are here.
_tweak^prone
_tweak^prone10mo ago
thanks. i will look into it.
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
zegevlier
zegevlier10mo ago
1) No, I don't think they are. Workers aren't very good at jobs that take a long time. 2) 30 seconds, generally. 15 minutes for cron triggers and queue consumers. See the docs 3) If the job can be split up into smaller jobs that take no more than 30 seconds each, you could use DOs and alarms to do the job step by step. Doing it like this would allow you to query the status in between. 4) It's not great. Postgress is better supported I don't understand your question. Where are you getting this?
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
zegevlier
zegevlier10mo ago
What prompted you to ask this question?
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
zegevlier
zegevlier10mo ago
I don't understand what you are referring to. Is this something you found in the docs? Something you read in a blog post? Something you read here on discord? Something you're seeing yourself?
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
zegevlier
zegevlier10mo ago
Which one? Please send a link
Unknown User
Unknown User10mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server