Path of a http request through Phoenix

I have a perhaps simple question about the general Phoenix framework and how HTTP requests are processed using Phoenix.

A little context: I am relatively new to Elixir/Phoenix and am tasked with trying to find bottlenecks in our app and try to optimize request processing durations. In particular, I am interested in learning more about what happens after the resolver is finished.

Since I am a new user I am unable to upload a screenshot of a sample trace, so here is my best attempt at describing. After the resolver is finished I notice quite a bit of unaccounted time (as in we do not have any observability for that duration since we are unsure exactly what is going on during that time) between that and when the json encoding happens - about 70ms.

I was hoping to get a little bit of guidance on how requests are processed through a Phoenix framework (and thus, what might be happening during this unaccounted time), what resources I can look up to learn more about request processing in Phoenix, and perhaps if there were any ideas about how the post-resolver steps can be observed/traced and/or optimized if they appear to be taking “too long”.

I appreciate your time and any feedback you might have!

1 Like