Hey everyone! New to the forum, not new to Elixir.
In any case, recently had a discussion with @benwilson512 on overhead during GQL requests, and then saw a related question in the Absinthe channel on Slack, so decided to open it up here for input/guidance.
We’ve been tracing our API’s performance in Datadog and have seen some oddities that we can’t quite diagnose. Pictures are worth 1000 words, so here are some flame graphs for one request that demonstrates the issue:
The overall flame graph
1st Flame: Token Auth (in our Context)
2nd Flame: GQL Resolution
What’s happening in the gaps after auth/context and after the actual resolution?
This is just one request, but many of our requests have this shape, where the majority of the request has something unknown happening for at least 50ms or so. In some cases, we have 100ms or so unaccounted for, usually on the tail-end of the request post-resolution.
- App is released via
mix releaseto AWS (EC2 machine) and deployed behind an ELB (https).
- Elixir 1.9.1, Erlang 22, Absinthe v1.5.0, Absinthe Plug v1.5.0-rc2, Absinthe Phoenix 1.5.0-rc.0
- The app is behind a Phoenix Router, Phoenix Endpoint, but is an API server.
Is anyone else seeing things like this? Happy to answer any other questions to help figure this out!