kare / ngx_http_auth_crowd_module

Provides Crowd authentication for Nginx
Other
37 stars 16 forks source link

Performance problems (module authenticates against crowd on each request) #4

Closed fgimian closed 9 years ago

fgimian commented 9 years ago

Hey there Kare, great job on this module for nginx! :smile:

Once I started using it on our systems, I noticed it was significantly slower than the Apache module.

After enabling debug on my crowd server and comparing the requests made vs the apache module, I realised that the reason the performance was worse was that an authentication request was sent for every single GET request against nginx. Apache only seems to send one request to Crowd and then keeps the user logged in.

Is there any way to offer similar behaviour?

Here are the test results with 100 requests sent to our dashboard using various forms of authentication:

Atlassian Crowd (Nginx)   : 162.766 secs
Atlassian Crowd (Apache)  : 33.797 secs
No Authentication (Nginx) : 2.068 secs

Any help would be greatly appreciated, I really don't want to switch back to Apache :smile:

Cheers Fotis

kare commented 9 years ago

Module works as intended. It is stateless by design. You may consider a beefier auth server.

Cheers, Kare