-
Multi Tenancy and Feature Flags, Spring to NestJS: Tenant A Saw Tenant B →
The last episode of the series. Two requests in flight, and one tenant read the other's id. Measured on both stacks: ThreadLocal and AsyncLocalStorage, the cost of request scope, and a rollout that 791 users saw differently.
-
WebSockets in NestJS, for Spring Developers: One Slow Client, 48 MB →
A client that stops reading: Spring closed it at 512 KB, NestJS queued about 48 MB for it. Measured on both stacks: Socket.IO against plain WebSocket, fan out across two instances, and the slow-client policy you have to choose.
-
Caching in NestJS with Redis, for Spring Developers: Bob Saw Alice →
A cached account endpoint served Alice's balance to Bob on Spring Boot and NestJS. Measured: the key, the lifetime and the fill policy, including when @Cacheable(sync = true) helps on Redis and when it does not.
-
Spring to NestJS Exception Filters: 500 or Process Exit? →
An exception thrown inside a request becomes a response on both Spring and NestJS. A rejected promise nobody owns never reaches a filter, and on Node 22 it ends the process. Measured on both stacks, with the filter, the ControllerAdvice beside it, and the two honest fixes.
-
NestJS Guards for Spring Developers: The Route You Forgot →
A refunds route added beside a guarded payments controller answered 401 in Spring Boot and 200 in NestJS. Measured: global guards with a public marker, 401 against 403, and why @PreAuthorize and a Nest role guard protect different things.
-
Calling APIs from NestJS, for Spring Developers: One Line, Four Traps →
RestClient, @nestjs/axios and the new @nestjs/http-client all waited ten seconds by default. Measured: timeouts and what they do not cancel, the call that never ran, what counts as failure, and a one second timeout that took three.
-
NestJS Integration Tests with PostgreSQL for Spring Developers: Two Rows, Not One →
Two integration tests against a real Postgres: 1 and 1 under @DataJpaTest, 1 and 2 in NestJS, 3 and 4 on the next run. Where the rollback really comes from, where a test transaction stops, and the reset that works for requests too.
-
Spring to NestJS Middleware and Interceptors: Filter ≠ Middleware →
A Spring filter catches downstream errors with a try block around chain.doFilter. The same try block around next() in NestJS middleware catches nothing. Measured on both stacks, with the interceptor that does see the error, one map() that reshapes every response, and the Spring hook whose name misleads.
-
Spring to NestJS with MongoDB and Mongoose: Debit Vanished →
Two debits of 30 and 50 from a balance of 100 left 50, on Spring Data MongoDB and on Mongoose. Measured on both stacks: optimistic concurrency, atomic updates, validation by write path, and why $inc needs its rule in the filter.
-
NestJS Rate Limiting for Spring Developers: The Wrong User Blocked →
Behind a proxy, client two's first request got 429 on Spring Boot and NestJS. Measured: how far to trust X-Forwarded-For, keying by a verified user, in-memory counts against Redis, and a window edge where the two stacks disagreed.