gate-sso / gate

Gate is MFA Enabled SSO Platform that supports SAML, OAuth, Linux shell login and CAS
https://gate-sso.github.io
MIT License
203 stars 53 forks source link

Thundering herd issue whenever group with high number of host machines is modified #127

Closed giosakti closed 5 years ago

giosakti commented 5 years ago

Steps to reproduce:

  1. Try adding / deleting a user in group with high number of host machines, such as systems_ssh or sysadmins
  2. Gate will remove all host machines cache
  3. All host machines will call gate to fetch the sysadmins, which gate will now fetch from DB
  4. Gate won't be able to satisfy in time, causing timeouts
ajeygore commented 5 years ago

This has been fixed with added multi layer caching, we need to refactor the code to make it much better, but for now, this is kind of working fine.