The archive · 24 posts · Jul 2025 - now

The notebook, in full. Sorted newest first.

Every post, newest first. Filter by topic, or scroll the chronological view.

posts24
topics3
last update2026-06-28
reading time~5 h total
rss
  • Series · 6 partsComplete

    Tail Latency & System Behavior

    Runnable Java experiments on the failure patterns that show up under real load: tail latency, queueing, hedged requests, coordinated omission, backpressure, and SLO engineering. Deterministic outputs, checked-in CSVs, reproducible on any machine.

    • 06
      Part
      SLO Engineering & Designing Predictable Services Under Load

      A deterministic Java SLO simulation against a 99%-under-200ms objective. A timeout caps p99 at 200ms yet scores the same 57.36% SLI as doing nothing, because a fast failure is still a failure; a bulkhead holds 99.60% with 60% of the error budget left. Burn rate fires from a single window.

      28 Jun 2026
      7 min
    • 05
      Part
      Backpressure Design Patterns

      A deterministic Java comparison of five admission strategies under identical 2x overload. Reject-fast policies (token bucket, rate limiter) hold p99 at 10ms; a bounded queue accepts fewer requests at a 500ms p99, because under sustained overload a buffer is the worst of both.

      28 Jun 2026
      7 min
    • 04
      Part
      The Coordinated Omission Problem

      A deterministic Java measurement harness where a closed-loop benchmark reports a whole-run p99 of 10ms for a service that froze for 500ms, while open-loop scheduling and HdrHistogram's coordinated-omission correction both report 460ms from the same samples.

      21 Jun 2026
      6 min
    • + 3 earlier parts
      • 03
        Part
        Hedged Requests & Speculative Execution

        A deterministic Java hedging simulation where a p95 threshold cuts p99 from 200ms to 43ms for 3.7% extra load, while a p99 threshold improves nothing and burns the most wasted work. Hedging is a latency technique you buy with capacity.

        14 Jun 2026
        7 min
      • 02
        Part
        Queueing Theory for Engineers

        A deterministic Java queueing simulation where p99 stays at 10ms through rho=1.00, then jumps to 109ms at rho=1.05 and 605ms at rho=1.30 while service time stays fixed.

        07 Jun 2026
        10 min
      • 01
        Part
        Why Average Latency Lies

        A deterministic Java simulation where baseline p99=34ms becomes fan-out p99=597ms without changing the downstream latency sampler. Average latency is structurally incapable of catching that tail pain.

        31 May 2026
        9 min
  • Series · 9 partsComplete

    Structured Concurrency

    Nine posts written through a fan-out service rollout. Cancellation, timeouts, and what to do when a subtask outlives the request.

    • 09
      Part
      Migrating our fan-out service from Java 21 to Java 25

      Most of the migration was mechanical. ShutdownOnFailure became a Joiner, throwIfFailed disappeared, and StructuredTaskScope.open replaced the constructor. Two things were not mechanical, and those are the ones worth reading.

      17 May 2026
      12 min
    • 08
      Part
      Four operational checks we run on every StructuredTaskScope

      Before a fan-out service can be trusted under load, four things need to be true: outcomes counted per scope, deadlines propagated, bulkheads in place, and pinning watched in JFR. What each one looks like in code.

      10 May 2026
      10 min
    • 07
      Part
      Three structured-concurrency patterns we run in a fan-out service

      Structured concurrency patterns are worth the complexity only when the cancellation policy is decided before the first fork, not after the first timeout. The three we run: aggregation on quorum, bulkheading per tenant, and a deadline shape that protects against one slow upstream.

      04 May 2026
      8 min
    • + 6 earlier parts
      • 06
        Part
        Composing resilience policies as separable layers

        Resilience composition in structured concurrency comes down to one rule: keep each policy a separable layer that fires visibly in logs, or rebuild the complexity you were trying to remove.

        26 Apr 2026
        10 min
      • 05
        Part
        Why downstream capacity is the real ceiling on fan-out

        The real ceiling on a fan-out request is downstream capacity, not the thread count. One semaphore per dependency type stops a hot path from draining the pool everyone else shares. How we set them and what changes when traffic shape shifts.

        19 Apr 2026
        10 min
      • 04
        Part
        Two workflow shapes that show up after fork-and-wait

        Past basic fork-and-wait, two workflow shapes dominate. Streaming progress as subtasks finish works for user-facing flows. Nested scopes that mirror the service tree work for fan-out into fan-out. What each one costs.

        12 Apr 2026
        10 min
      • 03
        Part
        Cancelling siblings before they burn capacity

        Not every failure is a timeout. A failed risk check turns the rest of the fan-out into wasted work, so the fix is to throw inside the subtask, cancelling its siblings before they burn capacity. The pattern, the implementation, and where it backfires.

        06 Apr 2026
        10 min
      • 02
        Part
        What a missed deadline should do, and what it should not

        Timeouts in distributed code are routine, not exceptional. The real question is whether a missed deadline should fail the whole request or return what made it back in time. The three timeout shapes we run and when each one fits.

        30 Mar 2026
        10 min
      • 01
        Part
        What structured scopes actually catch

        Most concurrency bugs in service code come from missing lifecycle, not missing parallelism. A scope that owns its forks is what makes task lifetime visible in the code that started them. The bugs that go away when scopes are right.

        22 Mar 2026
        15 min
  • Series · 9 partsComplete

    Project Loom

    Expert guide to Java's Project Loom. Learn virtual threads, structured concurrency, and scoped values to build highly scalable, efficient Java applications. Complete tutorials and best practices.

    • 09
      Part
      Migrating Project Loom Code from Java 21 to Java 25

      The Loom migration from Java 21 to Java 25 is one real change plus two cleanups: Joiner-based scopes replace ShutdownOnFailure, scoped values lose the preview flag, and virtual threads stay exactly where you left them.

      31 Aug 2025
      16 min
    • 08
      Part
      Future Directions and Migration Planning

      Loom roadmap planning is mostly a timing problem: adopting preview features too early and waiting until they settle both ship nothing in the end.

      24 Aug 2025
      15 min
    • 07
      Part
      Production Readiness, Monitoring, and Debugging

      Most thread-pool dashboards go quiet once a service moves to virtual threads, because a small carrier count hides millions of virtual threads and high CPU usually means pinning, not business load.

      17 Aug 2025
      14 min
    • + 6 earlier parts
      • 06
        Part
        Performance Deep Dive

        Benchmark numbers for virtual threads versus reactive code disagree wildly because the workload dictates the answer, not the model: I/O-bound code usually benefits, CPU-bound rarely does, and non-blocking moves work without removing it.

        10 Aug 2025
        12 min
      • 05
        Part
        Advanced Structured Concurrency Patterns

        StructuredTaskScope on its own is a parallel-fetch helper, and the resilience policy that makes it usable against a flaky downstream belongs in one handler instead of duplicated at every call site.

        03 Aug 2025
        12 min
      • 04
        Part
        Structured Concurrency in Practice

        Long CompletableFuture chains look fine in code review and painful in incident calls because a failed call leaves its siblings still running, and a structured scope is what cancels them on the way out.

        27 Jul 2025
        25 min
      • 03
        Part
        Real-World Microservices

        A microservice that swaps its executor for virtual threads loses the thread-pool ceiling but gains a different operational surface: orchestrating fan-out cleanly, watching pinning instead of pool depth, and noticing that downstream capacity is now the limit.

        20 Jul 2025
        28 min
      • 02
        Part
        Building Web Services with Virtual Threads

        The reason web servers moved to reactive code was that platform threads cost too much to dedicate one per blocking request, and virtual threads remove that cost without asking the request handler to look any different.

        13 Jul 2025
        15 min
      • 01
        Part
        Java Virtual Threads: Why They Matter for I/O Scalability

        Discover Java's virtual threads revolution with Project Loom. Learn why Java's threading model is changing forever, performance benefits, migration strategies, and real-world implementation examples. Complete guide to lightweight concurrency in Java 21+.

        06 Jul 2025
        15 min