-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
caddyauth: Add singleflight for basic auth #5344
Conversation
u5surf
commented
Jan 30, 2023
- Fixes Basic Auth causes Caddy to use an extraordinary amount of CPU while viewing the NetData Dashboard #5338
- it occurred the thunder herd problem like this https://medium.com/@mhrlife/avoid-duplicate-requests-while-filling-cache-98c687879f59
* Fixes caddyserver#5338 * it occurred the thunder herd problem like this https://medium.com/@mhrlife/avoid-duplicate-requests-while-filling-cache-98c687879f59
Oooh, that's really cool! I didn't know Go had a build-in package to deal with this particular problem. |
Fix comment Co-authored-by: Francis Lavoie <lavofr@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also learned something new -- thanks for the patch! I might have to use this in CertMagic. I looked at the source for singleflight and it's doing basically the same thing as I hand-rolled in CertMagic.
I'm not sure why the lint keeps failing on this one. |