RPC

Articles on RPC between Node.js microservices: request/reply over a message queue, typed clients, RPC over Redis, and why internal APIs need not be REST.

13 articles

Aug 25, 2026 · Serhiy Morenko

Typed at compile time, unchecked on the wire: runtime validation for TypeScript services

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.

read →
Aug 18, 2026 · Mykhailo Stadnyk

Cache invalidation across services: a TTL, a tag, or the database

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.

read →
Aug 14, 2026 · Andrii Glushko

The N+1 problem when GraphQL resolvers call microservices

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.

read →
Aug 13, 2026 · Serhiy Morenko

Distributed tracing for Node.js services over a message queue

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.

read →
Aug 3, 2026 · Andrii Glushko

@imqueue vs NATS: a framework and a transport are not the same choice

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.

read →
Aug 3, 2026 · Mykhailo Stadnyk

How Node.js services talk to each other in 2026: the honest options

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.

read →
Jul 23, 2026 · Serhiy Morenko

RPC over Redis in Node.js: patterns and pitfalls

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.

read →
Jul 22, 2026 · Mykhailo Stadnyk

RPC between Node.js microservices over a message queue

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.

read →
Jul 19, 2026 · Serhiy Morenko

Type-safe service-to-service communication in TypeScript

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.

read →
Jun 27, 2026 · Andrii Glushko

Internal APIs don't need to be REST

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.

read →
Jun 24, 2026 · Andrii Glushko

From monolith to services: a low-risk first extraction

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.

read →
Jun 14, 2026 · Andrii Glushko

tRPC vs @imqueue: client–server types vs service–service RPC

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.

read →
Jun 9, 2026 · Mykhailo Stadnyk

gRPC vs message-queue RPC for internal Node.js services

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.

read →