#nodejs

posts tagged #nodejs

0

NestJS rate limiting: in-memory vs Redis vs Postgres (two instances break memory)

Waseem Anjum NestJS Rate Limiting: Memory vs Redis vs Postgres | Waseem Anjum fabwaseem.com
preview

I wrote this (my own blog). I shipped Nest with the default @nestjs/throttler storage and only noticed the hole when a second instance sat behind the load balancer — each process kept its own counter, so a client that should stop at 100/min quietly got closer to 200.

Retested on Nest 12.3 / throttler 6.7 with limit 100/60s on one box. One process: memory, Redis and Postgres all 429 on request 101. Two processes alternating the same IP: memory allowed all 130; Redis and Postgres stopped at 100. Localhost p50 was 0.36 ms memory, 0.38 ms Redis, 1.00 ms Postgres.

Storage code and tables are in the post. Curious what people use in production when they already have Postgres and don’t want Redis just for counters.

I wrote this (my own blog). I shipped Nest with the default @nestjs/throttler storage and only noticed the hole when a second instance sat behind the load balancer — each process kept its own counter, so a client that should stop at 100/min quietly got closer to 200.

Retested on Nest 12.3 / throttler 6.7 with limit 100/60s on one box. One process: memory, Redis and Postgres all 429 on request 101. Two processes alternating the same IP: memory allowed all 130; Redis and Postgres stopped at 100. Localhost p50 was 0.36 ms memory, 0.38 ms Redis, 1.00 ms Postgres.

Storage code and tables are in the post. Curious what people use in production when they already have Postgres and don’t want Redis just for counters.

0

NestJS vs Hono vs Fastify on Node 26: same three routes, one core each

Waseem Anjum Hono vs Express vs Fastify in 2026: Benchmarks + NestJS | Waseem Anjum fabwaseem.com
preview

I wrote this (my own blog). I ran the same three routes on one CPU core each, 3 rounds, median, on Node.js 26: Fastify 85k rps GET /json, Hono 83k, NestJS on Fastify 70k, Express 49k, NestJS on Express 44k. Switching NestJS from Express to Fastify gave 60-75% more GET throughput with the same controllers. Hono started in 90 ms; NestJS took 404-486 ms and ~40 MB more RAM. With a real DB call in each handler most of the gap shrinks.

Full tables and how to reproduce are in the post. Curious what people run in production and why.

I wrote this (my own blog). I ran the same three routes on one CPU core each, 3 rounds, median, on Node.js 26: Fastify 85k rps GET /json, Hono 83k, NestJS on Fastify 70k, Express 49k, NestJS on Express 44k. Switching NestJS from Express to Fastify gave 60-75% more GET throughput with the same controllers. Hono started in 90 ms; NestJS took 404-486 ms and ~40 MB more RAM. With a real DB call in each handler most of the gap shrinks.

Full tables and how to reproduce are in the post. Curious what people run in production and why.

100

Broccoli2Shell: the Brotli decoder bug (CVE-2026-111497) - Affecting Node.js, Python, C library

Broccoli2Shell Broccoli2Shell: the Brotli decoder bug (CVE-2026-111497) broccoli2shell.com
preview

CVE-2026-111497 (Broccoli2Shell, aka Node2Shell): an out-of-bounds write in Google’s Brotli decoder affecting Node.js, Python Brotli/brotlicffi and anything built on the C decoder. Affected versions, how to check, and how to fix it.

CVE-2026-111497 (Broccoli2Shell, aka Node2Shell): an out-of-bounds write in Google’s Brotli decoder affecting Node.js, Python Brotli/brotlicffi and anything built on the C decoder. Affected versions, how to check, and how to fix it.

0

pompelmi – ClamAV antivirus scanning for Node.js, zero dependencies

GitHub GitHub - pompelmi/pompelmi: ClamAV antivirus scanning for Node.js — scan file uploads with a single function call. Zero dependencies. Typed Symbol verdicts. Local or Docker/clamd. github.com
preview

A minimal Node.js wrapper around ClamAV that scans any file and returns a typed Verdict Symbol: Verdict.Clean, Verdict.Malicious, or Verdict.ScanError.

No daemons. No cloud. No native bindings. Zero runtime dependencies.

Works locally via clamscan or remotely via clamd TCP socket (Docker-friendly).

npm install pompelmi

Repo: github.com/pompelmi/pompelmi Issues, PRs, and stars all welcome — it’s how open source stays alive.

A minimal Node.js wrapper around ClamAV that scans any file and returns a typed Verdict Symbol: Verdict.Clean, Verdict.Malicious, or Verdict.ScanError.

No daemons. No cloud. No native bindings. Zero runtime dependencies.

Works locally via clamscan or remotely via clamd TCP socket (Docker-friendly).

npm install pompelmi

Repo: github.com/pompelmi/pompelmi Issues, PRs, and stars all welcome — it’s how open source stays alive.

0

I made a tool to hunt down changelog.md docs for packages https://github.com/james2doyle/changelogger

preview

I made a tool to hunt down changelog.md docs for @nodejs packages https://github.com/james2doyle/changelogger
I was recently upgrading a site and had a hell of a time finding all the notes I needed to safely upgrade all the dependencies. I’m curious to have some people try it out

I made a tool to hunt down changelog.md docs for @nodejs packages https://github.com/james2doyle/changelogger
I was recently upgrading a site and had a hell of a time finding all the notes I needed to safely upgrade all the dependencies. I’m curious to have some people try it out