[{"title":"Fifty callers, one query: the cache stampede and the decorator that ends it","url":"/blog/cache-stampede-single-flight-nodejs/","summary":"A cache is at its most useless in the one moment you need it: the key is cold, fifty requests miss it together, and fifty copies of the same query hit the database. Measured — and measured again with one line above the method that makes it one query, one result, fifty callers served.","author":"mykhailo-stadnyk","topics":["cache","patterns","performance","rpc"],"date":"2026-09-08"},{"title":"The contract your services already publish: contract testing for Node.js microservices","url":"/blog/contract-testing-generated-clients/","summary":"Contract testing exists because two services can agree on a shape today and disagree on it next Thursday, with nothing in either repository to notice. If your clients are generated, most of that machinery is already built for you — and the part that is left is not the part the tooling advertises. Here is what an @imqueue service publishes about itself, how to pin it in a test that needs no broker, and the one place the contract can quietly disagree with your TypeScript.","author":"serhiy-morenko","topics":["testing","types","clients","dx"],"date":"2026-09-04"},{"title":"Meeting compliance: how to talk to your Redis broker over TLS","url":"/blog/tls-redis-broker-nodejs/","summary":"The questionnaire asks whether data is encrypted in transit, and you know the answer for the edge. Then you remember the broker — the one connection every service holds open all day, carrying every argument and every return value, and speaking a protocol that puts them on the wire as text. Here is what encrypting it takes, what it costs, and the two places it is easy to get wrong.","author":"mykhailo-stadnyk","topics":["security","transport","queue"],"date":"2026-09-01"},{"title":"Checking an IP against 10,000 networks without comparing it to 10,000 networks","url":"/blog/ip-allow-lists-cidr-nodejs/","summary":"Every request asks the same question — is this one of ours? — and the loop you wrote to answer it gets slower every time someone adds a partner range. Here is how to answer it in logarithmic time instead, what an address really is once you stop treating it as a string, and the quiet precondition that a fast implementation must uphold or it will lie to you.","author":"mykhailo-stadnyk","topics":["security","performance","patterns"],"date":"2026-08-28"},{"title":"Typed at compile time, unchecked on the wire: runtime validation for TypeScript services","url":"/blog/runtime-validation-typescript-services/","summary":"Your service method has a signature. The message that arrives has none — it is JSON, and JSON does not remember what it was supposed to be. This is the story of the bug that leaves no stack trace, why your compiler was never in a position to catch it, and how to put a real check at the boundary without slowing anything down.","author":"serhiy-morenko","topics":["types","rpc","dx"],"date":"2026-08-25"},{"title":"Autoscale on queue depth, not CPU","url":"/blog/autoscaling-nodejs-services-on-queue-depth/","summary":"CPU tells you a process is busy, not whether anyone is waiting. An @imqueue service's backlog is a Redis list, so KEDA can scale on it with no exporter, no Prometheus and no code change — and the metrics server covers the case where you need more.","author":"mykhailo-stadnyk","topics":["queue","architecture","performance","resilience"],"date":"2026-08-22"},{"title":"Nothing threw, and the job never ran: silent failures in a Node.js message queue","url":"/blog/silent-failures-nodejs-message-queue/","summary":"A send() that resolves with a message id nobody will ever deliver. A push() that returns cleanly onto a queue redis refused to write. Neither throws, and neither can — the caller has already moved on by the time redis answers. That silence is over: here is what each of those failures now writes to the log instead, and the one upgrade note that costs you a stack trace.","author":"andrii","topics":["observability","resilience","delivery","jobs"],"date":"2026-08-21"},{"title":"Cache invalidation across services: a TTL, a tag, or the database","url":"/blog/cache-invalidation-nodejs-microservices/","summary":"Caching a service method is one decorator. Deciding when the entry dies is the whole job. Here are the three mechanisms measured — a guessed TTL, a tag invalidated by an event, and PostgreSQL dropping the entry 6ms after the row changes — plus the four ways a cache goes on serving data it already knows is stale, and a fifth that got fixed while this was being written.","author":"mykhailo-stadnyk","topics":["cache","performance","rpc","patterns"],"date":"2026-08-18"},{"title":"The N+1 problem when GraphQL resolvers call microservices","url":"/blog/graphql-n-plus-1-microservices/","summary":"A field resolver runs once per parent object. Put a service call inside it and one innocent-looking query becomes twenty-six. Here is the same query measured at 26 calls and at 3, why your latency chart will not show you the difference, and the two ways the fix comes back silently empty.","author":"andrii","topics":["graphql","rpc","patterns","performance"],"date":"2026-08-14"},{"title":"Distributed tracing for Node.js services over a message queue","url":"/blog/distributed-tracing-nodejs-message-queue/","summary":"The standard objection to queue-based RPC is that you lose the trace: the caller sends, something else picks it up, and the connection between them is gone. It isn't — the trace context rides in the request metadata. Here is a measured three-process trace, and the four ways it silently comes out wrong.","author":"serhiy-morenko","topics":["observability","rpc","queue","patterns"],"date":"2026-08-13"},{"title":"@imqueue vs NATS: a framework and a transport are not the same choice","url":"/blog/imqueue-vs-nats/","summary":"NATS is a messaging system; @imqueue is an RPC framework that happens to use one. Comparing them means deciding how much of the contract you want to write yourself — and whether your fleet is Node-only.","author":"andrii","topics":["comparison","transport","rpc","architecture","delivery"],"date":"2026-08-03"},{"title":"How Node.js services talk to each other in 2026: the honest options","url":"/blog/nodejs-service-communication-options-2026/","summary":"REST, gRPC, tRPC, NATS, a framework like NestJS or Moleculer, or RPC over a message queue. Six real approaches, what each one costs, and the two questions that actually decide it — including when @imqueue is the wrong answer.","author":"mykhailo-stadnyk","topics":["architecture","comparison","rpc","transport","types"],"date":"2026-08-03"},{"title":"One notification, every replica: the LISTEN/NOTIFY duplicate problem","url":"/blog/postgres-notify-duplicate-listeners/","summary":"LISTEN/NOTIFY is a broadcast, not a queue. Scale a Node app to three replicas and the same notification gets handled three times — no error, no warning, three charges on the card. Here's why, and what an inter-process lock actually does about it.","author":"serhiy-morenko","topics":["patterns","resilience","delivery"],"date":"2026-07-31"},{"title":"Graceful shutdown and zero-drop deploys","url":"/blog/graceful-shutdown-zero-drop-deploys/","summary":"Every deploy sends a kill signal to a process that is probably in the middle of something. Nothing 500s, no dashboard turns red, and the work is gone anyway. Here's what actually happens to an in-flight message on SIGTERM, and the built-in drain that keeps it.","author":"andrii","topics":["resilience","queue","patterns"],"date":"2026-07-28"},{"title":"Delayed and scheduled work without adding a job system","url":"/blog/scheduled-work-without-a-job-system/","summary":"\"Send that email in 24 hours\" usually turns into a second deployment, a second data model, and a job record shadowing a service method you already wrote. Often the message queue you already run can just do it. Here's how deferral works as a parameter, and what it costs.","author":"mykhailo-stadnyk","topics":["jobs","delivery","queue"],"date":"2026-07-25"},{"title":"Auto-scaling Redis broker: with and without broadcast","url":"/blog/horizontally-scalable-redis-broker/","summary":"One Redis behind your message bus is a ceiling and a single point of failure. The promoter and unicaster modules turn a fleet of plain Redis instances into a horizontally auto-scaling broker — here are the recipes for networks that deliver broadcast and for clouds like GCP that don't, and how to encrypt the result when the brokers announce addresses no certificate can carry.","author":"serhiy-morenko","topics":["discovery","queue","architecture","patterns"],"date":"2026-07-24"},{"title":"One isolated imq CLI home per @imqueue project","url":"/blog/isolated-imq-cli-environments/","summary":"Every imq invocation shares one ~/.imq — one config, one pid registry, one set of logs. Here's how to give each project its own isolated CLI environment with IMQ_CLI_HOME, plus recipes for direnv, shell wrappers, per-client tokens and disposable sandboxes.","author":"andrii","topics":["tooling","dx","patterns"],"date":"2026-07-23"},{"title":"RPC over Redis in Node.js: patterns and pitfalls","url":"/blog/rpc-over-redis-nodejs/","summary":"How request/reply RPC over Redis actually works in Node.js — correlation, timeouts and at-least-once delivery, which of those @imqueue handles for you, and what it deliberately leaves to you: retrying a failed RPC call, coalescing duplicate concurrent calls with @lock, and the circuit breaker it does not ship.","author":"serhiy-morenko","topics":["rpc","queue","transport","patterns"],"date":"2026-07-23"},{"title":"BullMQ alternatives for Node.js: an honest 2026 guide","url":"/blog/bullmq-alternatives/","summary":"BullMQ is the default Redis job queue for Node.js — but it isn't the only choice. Here's an even-handed map of the alternatives (Bee-Queue, pg-boss, Agenda, @imqueue/job and more), what each is actually good at, and how to pick.","author":"mykhailo-stadnyk","topics":["comparison","queue","jobs"],"date":"2026-07-22"},{"title":"RPC between Node.js microservices over a message queue","url":"/blog/rpc-over-message-queue-nodejs/","summary":"Why route internal service-to-service calls through a message queue instead of HTTP or gRPC — and how @imqueue makes those calls fully typed with zero client boilerplate.","author":"mykhailo-stadnyk","topics":["rpc","queue","architecture"],"date":"2026-07-22"},{"title":"Type-safe service-to-service communication in TypeScript","url":"/blog/type-safe-service-communication-typescript/","summary":"End-to-end types across service boundaries are easy inside one process and hard the moment you cross a network. Here's how to keep them without hand-writing clients or maintaining a schema language.","author":"serhiy-morenko","topics":["types","rpc","dx"],"date":"2026-07-19"},{"title":"Stop hand-writing and maintaining your microservice clients","url":"/blog/stop-hand-writing-microservice-clients/","summary":"Every service you call needs a client, and hand-maintained clients drift out of sync with the services they talk to. Here's why that happens, how to make the client fall out of the service, and what the generated approach costs.","author":"serhiy-morenko","topics":["clients","types","dx"],"date":"2026-07-17"},{"title":"Load balancing microservices without a load balancer","url":"/blog/load-balancing-microservices-without-a-load-balancer/","summary":"For internal service-to-service traffic, the load balancer you run and operate is often solving a problem a message queue solves for free. Here's the competing-consumers pattern, why pull beats push, and what you give up.","author":"mykhailo-stadnyk","topics":["load-balancing","queue","architecture"],"date":"2026-07-14"},{"title":"Do your Node.js back-ends really need service discovery?","url":"/blog/do-nodejs-backends-need-service-discovery/","summary":"Consul, etcd, DNS-SD — service discovery is a lot of machinery to stand up. Sometimes you genuinely need it; often you don't. Here's how to tell, and how a queue makes the question disappear.","author":"mykhailo-stadnyk","topics":["discovery","architecture","queue"],"date":"2026-07-12"},{"title":"Back-pressure for Node.js services","url":"/blog/backpressure-nodejs-services/","summary":"When a downstream service slows down, HTTP tends to turn that into a cascading failure. A queue absorbs the spike instead. Here's the difference, and the trade-offs to watch.","author":"mykhailo-stadnyk","topics":["backpressure","queue","resilience"],"date":"2026-07-09"},{"title":"Guaranteed message delivery: cost and when to use it","url":"/blog/guaranteed-message-delivery-cost/","summary":"\"Will I lose messages if a worker dies?\" is the right question — and the answer is a trade-off, not a yes/no. Here's how guaranteed delivery works, what it costs, and how to choose per workload.","author":"mykhailo-stadnyk","topics":["delivery","queue","resilience"],"date":"2026-07-07"},{"title":"Cutting the boilerplate out of Node.js microservices","url":"/blog/cutting-boilerplate-nodejs-microservices/","summary":"Most of a new service's first commit is ceremony — transport wiring, serialization, a client, CI, a Dockerfile. Here's where the boilerplate hides and how to stop writing it by hand.","author":"serhiy-morenko","topics":["dx","tooling","clients"],"date":"2026-07-04"},{"title":"Versioning microservices without breaking every caller","url":"/blog/versioning-microservices-without-breaking-callers/","summary":"A change to one service's method quietly breaks the services that call it — and you find out in production. Here's how to make breaking changes loud at build time, which changes are actually safe, and how to handle the window where both versions are live.","author":"serhiy-morenko","topics":["versioning","types","dx"],"date":"2026-07-02"},{"title":"Testing services that call each other","url":"/blog/testing-microservices-without-the-whole-stack/","summary":"Integration tests that require every service and its infrastructure running are slow, flaky, and painful. Here's a layered approach that tests most of your logic without spinning up the world.","author":"serhiy-morenko","topics":["testing","dx","clients"],"date":"2026-06-29"},{"title":"Internal APIs don't need to be REST","url":"/blog/internal-apis-dont-need-rest/","summary":"REST is a fine choice for public, resource-oriented APIs. For internal service-to-service calls it's often ceremony over a plain function call. Here's when to drop it and what to reach for instead.","author":"andrii","topics":["rpc","architecture","comparison"],"date":"2026-06-27"},{"title":"From monolith to services: a low-risk first extraction","url":"/blog/monolith-to-services-first-extraction/","summary":"You don't migrate a monolith by rewriting it. You extract one capability, keep everything else in place, and repeat. Here's a concrete, low-risk first step for a Node.js team.","author":"andrii","topics":["architecture","migration","rpc"],"date":"2026-06-24"},{"title":"Redis as a message bus: patterns beyond pub/sub","url":"/blog/redis-message-bus-patterns/","summary":"Most people know Redis pub/sub and stop there. Redis has richer primitives — lists, blocking pops, and streams — that make it a capable message bus. Here's a tour, and where each fits.","author":"mykhailo-stadnyk","topics":["queue","transport","patterns"],"date":"2026-06-22"},{"title":"@imqueue vs Moleculer: two takes on Node.js microservices","url":"/blog/imqueue-vs-moleculer/","summary":"Moleculer is a full-featured microservices framework with many transporters; @imqueue is a focused, TypeScript-first RPC layer over a message queue. Here's an honest comparison to help you pick.","author":"andrii","topics":["comparison","frameworks","architecture"],"date":"2026-06-19"},{"title":"@imqueue vs NestJS microservices: framework vs transport","url":"/blog/imqueue-vs-nestjs/","summary":"NestJS is a full application framework with a microservices module; @imqueue is a focused RPC transport. They're not really competitors — here's how they differ, where each is stronger, and how to run them together.","author":"andrii","topics":["comparison","frameworks","architecture"],"date":"2026-06-17"},{"title":"tRPC vs @imqueue: client–server types vs service–service RPC","url":"/blog/imqueue-vs-trpc/","summary":"tRPC gives you end-to-end types between a frontend and its backend. @imqueue gives you typed RPC between backend services over a queue. They solve adjacent — not competing — problems.","author":"andrii","topics":["comparison","types","rpc"],"date":"2026-06-14"},{"title":"@imqueue/job vs BullMQ: Redis job queues compared","url":"/blog/imqueue-vs-bullmq/","summary":"Both are Redis-backed job queues for Node.js. @imqueue/job is small, safe-by-default and scheduling-capable; BullMQ is the feature-rich one. Here's an honest split — plus the thing @imqueue does that BullMQ doesn't.","author":"andrii","topics":["comparison","queue","jobs"],"date":"2026-06-12"},{"title":"gRPC vs message-queue RPC for internal Node.js services","url":"/blog/grpc-vs-message-queue-rpc/","summary":"gRPC is the default answer for typed RPC — and a great one, especially across languages. For an all-Node.js back-end, routing RPC through a queue trades some of gRPC's strengths for a lot less infrastructure.","author":"mykhailo-stadnyk","topics":["comparison","rpc","transport"],"date":"2026-06-09"},{"title":"Benchmarking @imqueue: throughput and delivery modes","url":"/blog/benchmarking-imqueue-throughput/","summary":"Real measured throughput for @imqueue's message queue — ~200k msg/sec unreliable, ~120k guaranteed on a 24-core box — what the delivery modes cost, and a reproducible harness to measure the figures that matter: yours.","author":"mykhailo-stadnyk","topics":["performance","queue","benchmark"],"date":"2026-06-07"}]