Hi folks. Investigating performance issue now with...
# talk-hydra
a
Hi folks. Investigating performance issue now with Hydra. We are doing 100 rps of code grant flows and what we see is that after the consent service PUTs an accept login to Hydra and before Hydra does the next step and make a call to GET /consent get it's about 300 to 500ms of wait. What can be the reasons for such a long wait time and how it is possible to improve? Please see screenshot
r
Are you sure you're reading the trace correctly? I don't think hydra is doing any waiting there. Rather, there seems to be a gap in your instrumentation.
a
Hi Arne. Tnx for fast reply. We have a consent service that makes PUT to accept login request. As far as i aware for code grant flow the next step is hydra should do a call to /consent endpoint. As you see on the screenshot the time beetwin we do PUT accept login and the time when we actually receive consent get is about 500 ms. There is nothing else happening in beetwin
r
Hydra does no calls to a /consent endpoint. Your consent app/screen makes calls to /oauth2/auth/requests/{login,consent}/accept. Each time, hydra answers within 15ms.
The gap marked in your trace is probably missing instrumentation in the consent app.
a
but after we accept login request, we are receiving call from hydra on the /consent get. It's the call Hydra is initiating, not consent itself
it's also on the request diagram actually
r
That's not hydra making a request but a web browser.
a
Ory OAuth2 and OpenID Connect redirects the end user's browser to the "Consent Endpoint" established in your config:
so after we accept the login we expect hydra to do a redirect to the consent
we are redirecting to accept login, after this hydra should redirect to consent get, correct? while we see that this redirect call that coming on consent happens in 500ms
r
Hydra does not perform this redirect. It instructs the consent app to redirect the user agent (browser) to the next step. The point is that the
GET /consent
request is not performed by hydra, but by the user agent (browser). The gap marked in your trace is the consent app doing something (probably responding to the user agent and sending it to
/consent
). Hydra is not doing anything there.
a
but here as we can see on the request diagram i clearly see redirects that are happening beetwin client (browser) (on the very left) and hydra
tnx for response, anyway we will investigate. tnx a lot
Would you be so kind to advice in which header should we expect Hydra to put the traceID when doing redirect to get /login endpoint of login UI?