Performance
Measured performance work on Node.js services: benchmarked queue throughput, what each cache invalidation strategy costs, one GraphQL query that became twenty-six service calls, and autoscaling on backlog rather than CPU.
5 articles
Checking an IP against 10,000 networks without comparing it to 10,000 networks
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.
read →Autoscale on queue depth, not CPU
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.
read →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 →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 →Benchmarking @imqueue: throughput and delivery modes
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.
read →