workers question

Hello, I have a few questions about workers;

  • Let's say I setup 10 workers plan. That's 10 workers par App, not per account, right ?
  • Does each worker comes with additional ram ? How much ?
  • Does database queries consume our workers ?
  • When I setup a static file path on account, will our own worker be used to serve those static files ?


  • yes, 10 workers per app
  • we currently have a hard limit of ~2GB per worker on RAM, but this is tentative and subject to change. We do have policies in place where paying users get an advantage over free users when it comes to RAM and CPU. Also if it looks like your webapp is misbehaving (eg: trying to create a 1TB file, or stuck in an infinite loop creating new files etc) we kill your worker. Again, we may be changing these around.
  • if you are doing a database query from your webapp, then yes, the worker will be busy until the query returns. If you are doing a database query from a console, then workers will not be consumed
  • no, static files are served separately

your service is truly unbeatable, I couldn't find best compromise. Great job guys.

no, static files are served separately

What is service the static files in this case ? What are the resource consumed ? I ask this to know if I should put css and js file in S3 or just leave them in the designated static folder.

We are using this with a setting of offload-threads = 2

Basically for each worker, there are also two extra threads that will server static files for you. Each of these threads can handle multiple requests simulataneously (ie. serving files does not block).

I'm guessing the most effective way to optimize css/js etc would be doing the following instead of trying to increase the RAM/ other server resource allocation.

  1. don't serve standard library stuff yourself (eg: jquery)
  2. put all your own js into a single js file that will be minified, served once and cached (instead of having multiple requests to many static resources)

If you are using django, check out django-compressor for a magic way to do this!