Skip to content

Commit aaa78c2

Browse files
authored
Remove app level rate limiter, adjust moda config with comments for future reference (#55209)
1 parent bfc480f commit aaa78c2

File tree

7 files changed

+9
-338
lines changed

7 files changed

+9
-338
lines changed

config/kubernetes/production/deployments/webapp.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@ spec:
2323
image: docs-internal
2424
resources:
2525
requests:
26-
cpu: 8000m
27-
memory: 10Gi
26+
cpu: 4000m
27+
# Absolute minimum to start app is 1000m
28+
# Node is single-threaded but we want more CPUs
29+
# for OS and image resizing, and other binary executions
30+
# Better to increase replicas or memory than CPU
31+
memory: 8Gi
32+
# Absolute minimum to start app is 4500Mi
33+
# Would increase with more pages, versions, or languages supported
34+
# The additional memory helps during traffic surges
2835
limits:
2936
cpu: 16000m
3037
memory: 16Gi

package-lock.json

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@
268268
"dotenv": "^16.4.5",
269269
"escape-string-regexp": "5.0.0",
270270
"express": "4.21.2",
271-
"express-rate-limit": "7.4.0",
272271
"fastest-levenshtein": "1.0.16",
273272
"file-type": "20.0.0",
274273
"flat": "^6.0.1",

src/shielding/lib/fastly-ips.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.

src/shielding/middleware/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import handleOldNextDataPaths from './handle-old-next-data-paths'
66
import handleInvalidQuerystringValues from './handle-invalid-query-string-values'
77
import handleInvalidNextPaths from './handle-invalid-nextjs-paths'
88
import handleInvalidHeaders from './handle-invalid-headers'
9-
import { createRateLimiter } from './rate-limit'
109

1110
const router = express.Router()
1211

13-
router.use(createRateLimiter())
1412
router.use(handleInvalidQuerystrings)
1513
router.use(handleInvalidPaths)
1614
router.use(handleOldNextDataPaths)

src/shielding/middleware/rate-limit.ts

Lines changed: 0 additions & 169 deletions
This file was deleted.

0 commit comments

Comments
 (0)