Daniel Chaves
Back to blog

Node.js

Scaling Node.js and TypeScript to 99.99% availability

December 09, 20252 min read

Node.js is a solid choice for high-concurrency financial systems, as long as the architecture respects the particularities of its execution model.

Graceful shutdown is not optional

A deploy that kills the process without draining in-flight requests is a silent source of inconsistency — especially in flows that write to the ledger. The process should stop accepting new connections, wait for in-flight operations to finish, and only then shut down.

Circuit breakers on every external call

Every external dependency — the SPI, KYC providers, credit bureaus — needs a circuit breaker with an explicit fallback. The right architectural question isn't "what if this call fails," but "what does the system do when this call fails."

Queues to absorb spikes

BullMQ (on top of Redis) is enough for most asynchronous processing needs in financial platforms: idempotency by job ID, retries with exponential backoff, and continuously monitored dead-letter queues.

Observability from the first line of code

Distributed tracing, latency metrics by percentile (p50/p95/p99) and structured logs aren't a "nice to have" bolted on after the incident — they're what makes it possible to diagnose a production issue in minutes, not hours.

High availability is the result of dozens of small, consistent decisions — not a single infrastructure choice.