2585
|
|
|
Horacio Durán |
10 years ago
|
|
|
2584
|
|
|
Horacio Durán |
10 years ago
|
|
|
2583
|
|
|
Horacio Durán |
10 years ago
|
|
|
2582
|
|
|
Horacio Durán |
10 years ago
|
|
|
2581
|
|
|
Horacio Durán |
10 years ago
|
|
|
2580
|
|
|
Horacio Durán |
10 years ago
|
|
|
2579
|
|
|
Horacio Durán |
10 years ago
|
|
|
2578
|
|
|
Horacio Durán |
10 years ago
|
|
|
2577
|
|
|
Dimiter Naydenov |
10 years ago
|
|
|
2576
|
|
|
Dave Cheney |
10 years ago
|
|
|
2575
|
|
|
Tim Penhey |
10 years ago
|
|
|
2574
|
|
|
Horacio Durán |
10 years ago
|
|
|
2573
|
|
|
Ian Booth |
10 years ago
|
|
|
2572
|
|
|
Dave Cheney |
10 years ago
|
|
|
2571
|
|
|
Ian Booth |
10 years ago
|
|
|
2570
|
|
|
Roger Peppe |
10 years ago
|
|
|
2569
|
|
|
Dimiter Naydenov |
10 years ago
|
|
|
2568
|
|
|
Roger Peppe |
10 years ago
|
|
|
2567
|
|
|
Dimiter Naydenov |
10 years ago
|
|
|
2566
|
|
[r=jameinel],[bug=1290843] state/apiserver: rate limit Login requests
As part of scale testing, I noticed that when you have 1000s of units and you bounce the API Server, everything comes flooding back. It appears that all of the Login requests end up queued in Mongo, to the point that the system hangs.
This changes the Login request so that it limits the maximum number of concurrent requests (current value of 10 concurrent requests). It uses a new helper in utils/limiter.go that just creates some nice structure around a channel. We could probably structure it differently, or just use the channel directly, but it made it easier for me to understand what was going on.
I also set it up so that requests for a User to Login are not rate limited. That way even when restarting and all the agents are hammering away at the server, you should still be able to run things like "juju status".
I played around with the actual concurrency a bit, but 10 seemed to work just fine. The time for the system to come back to stable wasn't particularly affected (when they are going smoothly, Login only takes <100ms, the problem is that when they were flooding, they could take >5s).
https://codereview.appspot.com/83830045/
|
John Arbash Meinel |
10 years ago
|
|
|