Web Workers, Memory, and Network Calls

Learn about web workers, memory, and the outcomes of network calls in our Rails application.

In development, our Rails app uses the PumaPuma is a German multinational corporation that designs and manufactures athletic and casual footwear, apparel, and accessories. web server. This server receives requests and dispatches them to our Rails app (this is likely how it works in production as well). When a request comes in, Puma allocates a worker to handle that request. That worker works on only that request until a response is rendered—it can’t manage more than one request at a time.

When the response is rendered, the worker can work on another request. Puma keeps these workers in a pool, and that pool has a finite limit. This is because each worker consumes memory and CPU (even if it’s not doing anything), and because memory and CPU are finite resources, there can only be so many workers per server.

Get hands-on with 1400+ tech skills courses.