Forums

Do I need one web worker per app?

I have a custom account setup and current have 7 apps with 2 more being added in a coupe weeks. I am trying to understand the web worker setup. Currently I have one web worker per app, but my question is..do I need one web worker per app and/or are my total web workers shared between all my apps?

Thank you.

Currently the number that you can customize is the number of workers per app. ie. 3 workers == 3 workers for each webapp.

If you want more granularity, you can currently setup multiple subaccounts and link it by using the teacher function (to have a master account to oversee it).

Quick followup to this - I'm looking to set up staging and development versions of my web app, which per another answer would be at different subdomains like staging.mydomain.com and development.mydomain.com, so I would have three apps. The production site would need about 10-20 web workers, but the staging and development sites only need 1 or 2, leaving me with an extra $20-30 per month for idle web workers.

Would you recommend getting a teacher account to get more granularity as suggested above, or is there another solution? This seems like a pretty common use case.

Yes, it's certainly something on our list of things to address.

We do actually have support for varying the number of workers per website on the backend, so there is a (slightly messy) workaround that might be of use for you; let's say you needed 24 workers spread over three websites (20 for production, 2 each for staging and dev). You could set your account up so that you have 8 workers per website, for 24 total, and then email us and we could re-distribute the workers so that they were allocated to your websites in the pattern you wanted.

But obviously, a proper user interface for that would be better, and it's something we're planning to do -- no timeline at present, though.

Sounds great. Thank you! I'll email when I need workers distributed differently than the default.

OK -- glad we could help!