mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-04 06:39:02 +02:00
Merge pull request #4865 from overleaf/jpa-ho-load-shed-mvp
[clsi] very basic mvp for shedding load GitOrigin-RevId: 4b82934b395f8b9358e463c03cadda6a16c20b4f
This commit is contained in:
@@ -332,7 +332,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()
|
||||
|
||||
Reference in New Issue
Block a user