Skip to content

Comment on Ruby and Elixir: Polyglottin' FTWparent

Comments

Since Ruby's GIL means you can't do true parallel processing, it's common to kick off multiple worker processes and have them each take one job at a time.

If the job involves an expensive API call it will tie up a worker for the duration of the call.

So it's not so much ~thousands of jobs per second as it is a limitation of only 10 ruby processes per 1GB of memory. (A ruby process with the Rails env loaded is about 100MB.)

Elixir gives you the ability to make a few orders of magnitude more calls in a tiny amount of memory. (100,000 Elixir "workers" can be had in less than 1GB).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.