Update defaultHighWaterMark to 64KiB (Node 22's default) (#25522)

* Set defaultHighWaterMark to 16KiB

This is already the default in Node 20

* Set defaultHighWaterMark to 64KiB

Per https://github.com/overleaf/internal/pull/25522#issuecomment-2872035192

GitOrigin-RevId: 19d731abf683066654027de3a4f9ac0b8916f22c
This commit is contained in:
Antoine Clausse
2025-05-13 10:23:31 +02:00
committed by Copybot
parent 7c79c3b4c3
commit aa002369cb
10 changed files with 38 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
const http = require('node:http')
const https = require('node:https')
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
http.globalAgent.keepAlive = false
https.globalAgent.keepAlive = false

View File

@@ -1,5 +1,9 @@
const Path = require('node:path')
const os = require('node:os')
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
const isPreEmptible = process.env.PREEMPTIBLE === 'TRUE'
const CLSI_SERVER_ID = os.hostname().replace('-ctr', '')

View File

@@ -1,6 +1,9 @@
const http = require('node:http')
const https = require('node:https')
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
http.globalAgent.maxSockets = 300
http.globalAgent.keepAlive = false
https.globalAgent.keepAlive = false

View File

@@ -1,5 +1,9 @@
const http = require('node:http')
const https = require('node:https')
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
http.globalAgent.maxSockets = 300
http.globalAgent.keepAlive = false

View File

@@ -1,6 +1,9 @@
const http = require('node:http')
const https = require('node:https')
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
http.globalAgent.keepAlive = false
https.globalAgent.keepAlive = false

View File

@@ -1,4 +1,8 @@
const Path = require('node:path')
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
// environment variables renamed for consistency
// use AWS_ACCESS_KEY_ID-style going forward

View File

@@ -1,3 +1,8 @@
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
module.exports = {
internal: {
notifications: {

View File

@@ -1,6 +1,9 @@
const http = require('node:http')
const https = require('node:https')
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
http.globalAgent.keepAlive = false
https.globalAgent.keepAlive = false

View File

@@ -1,6 +1,10 @@
/* eslint-disable camelcase */
const http = require('node:http')
const https = require('node:https')
const stream = require('node:stream')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
http.globalAgent.keepAlive = false
https.globalAgent.keepAlive = false

View File

@@ -1,6 +1,10 @@
const Path = require('path')
const Path = require('node:path')
const stream = require('node:stream')
const { merge } = require('@overleaf/settings/merge')
// TODO(24011): remove this after node 22 update
stream.setDefaultHighWaterMark(false, 64 * 1024)
let defaultFeatures, siteUrl
// Make time interval config easier.