Web Development, Performance, Distributed Systems, APIs, Databases, Backend Engineering — Daily Update 2026-11-04

//

//

Web Development, Performance, Distributed Systems, APIs, Databases, Backend Engineering — Daily Update 2026-11-04

Web Development, Performance, Distributed Systems, APIs, Databases, Backend Engineering — Daily Update 2026-11-04

Runtime & Language Releases

Node.js 23.0.0 — --experimental-strip-types, node:sqlite, V8 13.1

Released Oct 29. Current release line (not LTS — LTS is 22.x). Key changes:

  • Type stripping — node --experimental-strip-types app.ts runs TypeScript files directly (no tsc, no tsx). Strips types, executes JS. Uses same logic as tsc --isolatedModules. No type checking — pair with tsc --noEmit in CI.
  • Built-in SQLite — import { DatabaseSync } from 'node:sqlite'. Synchronous, zero-dependency, file-based. WAL mode default. Not a replacement for better-sqlite3 (no async, no prepared statement caching) but useful for scripts, tests, edge workers.
  • V8 13.1 — WasmGC enabled by default, Maglev compiler tier for faster warmup, Intl.Segmenter ICU 76.
  • Permission model — --allow-fs-read, --allow-child-process flags stabilize (no longer experimental).

Bun 1.2 — Windows Stable, bun test Coverage, bun:sqlite Performance

Released Nov 2. Windows now tier-1 (MSVC build, no WSL needed). bun test --coverage outputs lcov/JSON. bun:sqlite 3-5x faster than better-sqlite3 on bulk inserts (benchmarks in release notes). Bun.serve() WebSocket compression (permessage-deflate).

Deno 2.1 — deno compile Node Modules, npm: Specifier Stabilization, JSR Publishing

Released Oct 31. deno compile --include node_modules bundles Node deps into single binary. npm: specifier (e.g. import express from 'npm:express@4') stable. deno publish targets JSR (not npm) by default — JSR offers native TS, provenance, no package.json.

TypeScript 5.7 — --erasableSyntaxOnly, import attributes, Control Flow Narrowing

Released Nov 1. --erasableSyntaxOnly errors on non-erasable TS features (enums, namespaces, parameter properties) — enforces “types as comments” discipline. Import attributes (import json from './data.json' with { type: 'json' }) stable. Narrowing for in, instanceof, typeof in discriminated unions improved.

Go 1.23.2 / 1.22.10 — Security Fixes, crypto/ecdsa Timing Attack

Released Nov 4. CVE-2026-XXXX: crypto/ecdsa scalar multiplication had data-dependent timing. Update immediately if verifying ECDSA signatures (JWT, TLS client certs, WebAuthn). go install golang.org/dl/go1.23.2@latest.

Rust 1.82 — #[diagnostic::on_unimplemented], std::sync::LazyLock, Cargo check-cfg

Released Oct 31. LazyLock — thread-safe, zero-cost once-cell (replaces once_cell crate). check-cfg validates cfg() names at compile time (catches typos). #[diagnostic::on_unimplemented] custom trait bound error messages.

Distributed Systems Deep Dive: CAP Theorem in Practice

The CAP theorem (Consistency, Availability, Partition tolerance — pick two) is often taught as a trilemma. In production, it’s a spectrum with nuanced trade-offs.

The Real Triangle

  • CP (Consistency + Partition tolerance) — Majority quorum systems: etcd, Consul, ZooKeeper, CockroachDB, PostgreSQL synchronous replication. During partition, minority partition becomes unavailable. Latency = RTT to quorum.
  • AP (Availability + Partition tolerance) — Dynamo-style: Cassandra, Riak, DynamoDB (eventual). Both partitions accept writes. Conflict resolution: last-writer-wins, CRDTs, application merge. Latency = local write.
  • CA (Consistency + Availability) — Only possible without partitions. Single-node DB, or multi-node with shared disk (Oracle RAC, SQL Server FCI). Not a distributed system.

What Actually Happens During a Partition

Network partitions are not binary — they’re asymmetric. Node A reaches B, B reaches C, but A cannot reach C. Quorum systems handle this via majority; the minority partition (A) steps down. But if your client talks to A, it sees unavailability even though B and C are healthy.

Mitigation: Client-side topology awareness (Cassandra token-aware driver, CockroachDB follower reads), multi-region deployment with latency-based routing, read replicas in each region.

Consistency Levels Are a Dial, Not a Switch

Level Read Write Use Case
Strong (Linearizable) Quorum Quorum Financial balances, inventory
Sequential Quorum Quorum User-facing state (order history)
Causal Quorum + vector clock Quorum Chat, collaborative editing
Read Your Writes Primary / sync replica Primary Session consistency
Eventual Any replica Any replica Analytics, logs, feeds

Most production systems use mixed consistency: strong for payments, eventual for analytics, read-your-writes for user sessions. The engineering is in the routing layer.

Database Internals: PostgreSQL Logical Replication Slots

Logical replication slots are the backbone of CDC (Change Data Capture), logical replication, and tools like Debezium, pgoutput, pglogical.

How Slots Work

  1. Creation: SELECT pg_create_logical_replication_slot('my_slot', 'pgoutput'); reserves a WAL position.
  2. Retention: WAL segments needed by the slot are retained (not recycled by checkpoint). pg_replication_slots shows restart_lsn (oldest needed) and confirmed_flush_lsn (consumer acknowledged).
  3. Consumption: Consumer reads via streaming protocol (START_REPLICATION SLOT my_slot LOGICAL) or SQL (pg_logical_slot_get_changes).
  4. Advancement: Consumer confirms processed LSN → slot advances → WAL can be recycled.

Failure Modes

  • Consumer down too long → WAL fills disk → pg_wal explosion → server panic. Fix: max_slot_wal_keep_size (default -1 = unlimited). Set to 10GB. Monitor pg_replication_slots.active = false.
  • Slot leak — Orphaned slots from failed consumers. Fix: pg_drop_replication_slot in cleanup job. Audit weekly.
  • Snapshot too old — Consumer lag exceeds max_logical_replication_workers or wal_sender_timeout. Fix: Tune timeouts, add workers, monitor flush_lsn - restart_lsn.

Production Checklist

  • Enable track_commit_timestamp = on for conflict detection.
  • Use pgoutput plugin (built-in, no extension) for standard logical replication.
  • For Debezium: plugin.name=pgoutput, slot.name=debezium, publication.autocreate.mode=filtered.
  • Alert on pg_replication_slots.restart_lsn lag > 1GB or > 1 hour.

API Patterns: Idempotency Keys — The Race Condition

Following up on the Consistency Trinity series (Article 1), here’s the Redis implementation that closes the check-then-set race.

The Naive Version (Broken)

// BROKEN: race between GET and SET
async function processWithIdempotency(key, handler) {
  const existing = await redis.get(key);
  if (existing) return JSON.parse(existing);
  const result = await handler();
  await redis.setex(key, 86400, JSON.stringify(result));
  return result;
}

Two concurrent requests with same key: both GET miss, both execute handler, both SET — last write wins, but handler ran twice.

The Correct Version (Lua Script — Atomic)

const IDEMPOTENCY_SCRIPT = `
local existing = redis.call('GET', KEYS[1])
if existing then return existing end
local result = cjson.encode(ARGV[1])
redis.call('SETEX', KEYS[1], ARGV[2], result)
return result
`;

async function processWithIdempotency(key, handler, ttl = 86400) {
  // handler() must be deterministic and side-effect-free until commit
  // In practice: build the response object, then commit atomically
  const result = await handler(); // pure computation
  return await redis.eval(IDEMPOTENCY_SCRIPT, 1, key, JSON.stringify(result), ttl);
}

Lua script executes atomically in Redis — no interleaving. The pattern: compute result outside the atomic section (pure function), then atomically store-if-absent.

PHP Equivalent (Redis Extension)

$lua = <<connect('127.0.0.1', 6379);
    $result = $handler(); // pure
    return $redis->eval($lua, [$key, json_encode($result), $ttl], 1);
}

TL;DR — Action Items This Week

Area Action Effort
Runtime Test Node 23 --experimental-strip-types in CI (pair with tsc --noEmit) Low
Runtime Evaluate Bun 1.2 on Windows for script/edge workloads Medium
Language Update Go 1.23.2 immediately (ECDSA timing attack) Critical
Architecture Map your consistency levels per domain (payments=strong, analytics=eventual) High
Database Audit PG replication slots: max_slot_wal_keep_size, alerting High
API Deploy atomic idempotency Lua script (Redis) — replace check-then-set Medium

Next daily update: 2026-11-05. Subscribe to the Backend Engineering category for direct delivery.

// THE TRANSMISSION LOG : FIELD NOTES

Weekly zero-fluff breakdowns of distributed systems, browser runtime performance, and production post-mortems delivered directly from Stella Sage.