MM-8607: Add ability to turn off non-critical services when under load; cluster support (#13267)
* MM-8607: Add cluster support for server busy status MM-8607: Busy.Cluster should be non-exported MM-8607: rename logging field seconds -> expires_sec MM-8607: each node clears its own busy flag MM-8607: ensure unit tests are not sensitive to test machine speed * MM-8607: chg comment to force CI rebuild
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
4ebc71ed38
Коммит
420c411595
@@ -312,7 +312,7 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
return s, nil
|
||||
}
|
||||
|
||||
// Global app opptions that should be applied to apps created by this server
|
||||
// Global app options that should be applied to apps created by this server
|
||||
func (s *Server) AppOptions() []AppOption {
|
||||
return []AppOption{
|
||||
ServerConnector(s),
|
||||
@@ -474,7 +474,7 @@ func (s *Server) Start() error {
|
||||
s.RateLimiter = rateLimiter
|
||||
handler = rateLimiter.RateLimitHandler(handler)
|
||||
}
|
||||
s.Busy = &Busy{}
|
||||
s.Busy = NewBusy(s.Cluster)
|
||||
|
||||
// Creating a logger for logging errors from http.Server at error level
|
||||
errStdLog, err := s.Log.StdLogAt(mlog.LevelError, mlog.String("source", "httpserver"))
|
||||
|
||||
Ссылка в новой задаче
Block a user