소스 검색

very basic mvp for shedding load

When the box is over 100% capacity start to shed load.

Use 5 min load average to make the system less likely to start moving
projects off after a temporary cpu spike
Henry Oswald 5 년 전
부모
커밋
8e2cd57cb9
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      services/clsi/app.js

+ 1 - 1
services/clsi/app.js

@@ -331,7 +331,7 @@ const loadTcpServer = net.createServer(function (socket) {
     const freeLoad = availableWorkingCpus - currentLoad
     let freeLoadPercentage = Math.round((freeLoad / availableWorkingCpus) * 100)
     if (freeLoadPercentage <= 0) {
-      freeLoadPercentage = 1 // when its 0 the server is set to drain and will move projects to different servers
+      freeLoadPercentage = 0 // when its 0 the server is set to drain and will move projects to different servers
     }
     socket.write(`up, ${freeLoadPercentage}%\n`, 'ASCII')
     return socket.end()