Deploying phoenix app in a single core machine

I have a phoenix app and i have used genservers to do work on the background. I have deployed this on a shared-1x-cpu@1024MB fly.io . Will my genserver work concurrently if I have only one core on my server?

The one BEAM scheduler will switch between BEAM processes very quickly. So all processes will progress as if they were running in parallel, but actually only one will be active at a time.

https://medium.com/flatiron-labs/elixir-and-the-beam-how-concurrency-really-works-3cc151cddd61

4 Likes

Yes, it still will. The BEAM was created in a time when there were no multicore CPUs. :wink:

2 Likes