How does Phoenix handle incoming HTTP requests?

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??

1 Like

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:


Thanks, I totally forgot Ranch was a thing! :cowboy_hat_face: :+1:

1 Like