Worker threads can be more convenient than FFI, as you don't need to compile anything, you can reuse the main application's functions, etc.
I make my comment to note tho that in many envs it’s easier to scale out than account for all the extra complications of multiple processes in a single container.
5 years ago I never would have given this comment a second thought.
Now I read it and have to wonder: when does the price of ram start showing up in the butchers bill from your cloud provider?
But the prices have gotten stupid: https://pcpartpicker.com/trends/price/memory/
https://appleinsider.com/articles/26/02/27/the-global-ram-an...