Hi guys, I would like to know more about how the Phoenix framework handles the incoming HTTP requests. Are requests “spawned” on single BEAM processes each one??
3 Likes
Hi @tovarchristian21. Neither Phoenix nor Plug actually handle the process architecture of the HTTP request itself, rather that is handled by a library called cowboy. Cowboy does indeed spawn a single BEAM process per request, after the actual connection is handled via one of the acceptors within a library called Ranch. There’s a great blog post series on how Ranch works you can find here: http://learningelixir.joekain.com/ranch-application-design/
7 Likes
Thanks, I totally forgot Ranch was a thing!
2 Likes