Is there some realiable way to check if worker is avilable to be retrieved via stub and invoked? Seems like if I to deploy new worker (upload), and right away call dispatcher get on it to invoke it (fetch), I get gateway timeout. But if i wait few seconds before invoking fetch, it seems to work more reliably.
TLDR: How do I gracefully handle updating user workers in my dispatch namespace once they are already in production? Note: I control the user worker code so every user worker will be THE SAME app just connected to different bindings instances
I am building a healthcare clinic management software and want to achieve the following architecture:
control plane worker where a user signs up their company
this kicks off a Workflow which provisions a tenant worker for that specific company alongside their own D1 database and R2 storage
the tenant is available via the subdomain pattern eg company1.example.com
the tenant worker handles its own authentication etc
I now have the subdomain based dynamic dispatch pattern working with a tenant worker that I have manually deployed
I have also successfully provisioned a tenant worker with its own D1 and R2 bindings via the Workers for Platforms Script Upload API
My question is if I make changes to the tenant app code and want to redeploy so that existing tenants will have the updated version of my application, how would I handle this in the cleanest way?
My solution I have thought of would be to store all the tenant names in a KV or D1 register and then in CI/CD I would loop through them and redeploy using wrangler
Is this the best option here or is there a more blessed path for this?
could you use http imports like deno does? not sure if they are supported. you'd suffer a small increase in cold start times though, but could probably layer aggresive caching around it using the basic cloudflare primitices
built my first WfP tests today (based on getting started docs) - some observations - clicking on Dispatcher on dashboard errors out completely. Tags are cool, but no way to add/edit them with web gui. Very little observability of user workers. I'm clicking/reloading the demo "hello world" and the stats aren't updating on the user worker, but that could just be a delay thing.
Hi all -- trying to understand the WfP pricing. It says 1000 Scripts are included and then $0.02/Script afterwards. Is that per month? Or is that the one-time price of deploying one script?
I guess that would rule out Cloudflare as an infrastructure provider for a platform that wants to give its users the Vercel-like UX of deploying preview environments that stay up indefinitely
Anyone know if the scripts billing is prorated? As-in, if I deploy a WfP script for 3 days, then delete it, am I charged roughly (3/30)*0.02 = $0.002(3/30)*0.02 = $0.002? Or will they charge for a full $0.02 for that script for that month?
Please do not ping community members for non-moderation reasons. Doing so will not solve your issue faster and will make people less likely to want to help you.
there is little docs on if I need to match the hashing used by cloudflare, or if it doesnt matter as long as my hashing strategy is consistent in my application layer