Enabling Gzip Compression with Istio

Enabling Gzip Compression with Istio

We recently enabled gzip compression in front of one of our NestJS services using Istio, and the improvement was immediate. The biggest win was on larger JSON responses. Our API was returning payloads that were fairly repetitive and very compressible, so once gzip was...
Implementing the Strategy Pattern in NestJS

Implementing the Strategy Pattern in NestJS

Writing Clean, Decoupled Code with the Strategy Pattern One of the biggest signs of a mature backend developer is understanding how to decouple high-level business logic from low-level implementation details. That’s exactly what the Dependency Inversion Principle...
Implementing Idempotency in NestJS with an Interceptor

Implementing Idempotency in NestJS with an Interceptor

When building APIs, especially for payments or operations that modify state, you want to avoid executing the same request multiple times if the client retries. Stripe popularized the concept of idempotency keys: clients attach a unique key to a request, and the server...