TeskaLabs / seacat-auth

SeaCat Auth provides authentication, authorization, identity management, session management and other access control features.
GNU General Public License v3.0
11 stars 7 forks source link

Improve nginx/anonymous endpoint performance #303

Open elpablos opened 10 months ago

elpablos commented 10 months ago

Why? If the endpoint /cookie/nginx/anonymous is under heavy load, MongoDB is suffering because of a big bunch of write operations into audit collection. Especially for one event: ANONYMOUS_SESSION_CREATED. We found out that this information is not so important to us and it is not necessary to put it into the audit.

Another place that generates big traffic is the synchronous cookie webhook. We found out that the important information is only when the anonymous user fulfills the login process and becomes a fully logged user. So it makes sense to avoid calls when an anonymous session is just built.

DoD

EDIT:

elpablos commented 10 months ago

https://github.com/TeskaLabs/seacat-auth/pull/304 - It's just a draft but it really helps 😅 Do with the PR whatever you want. I thought about config variables 🤔