Найти в Дзене

Virtual threads

A simple way to explain Virtual threads in production services: it changes how much accidental complexity we have to carry. Virtual threads make simple blocking code viable again for many request and integration workloads. For an everyday Java developer, the useful explanation is this: The developer-level question is simple: can we keep straightforward blocking code while still handling high concurrency without hiding the real bottleneck? A practical starting point: The trap: Do not assume virtual threads fix a slow database, under-sized pool, or accidental synchronized bottleneck. My architect note: Concurrency changes deserve load tests and failure tests, not just prettier source code. When a platform feature removes custom code, the real win is usually fewer private conventions to maintain. #Java #VirtualThreads #Backend

A simple way to explain Virtual threads in production services: it changes how much accidental complexity we have to carry.

Virtual threads make simple blocking code viable again for many request and integration workloads.

For an everyday Java developer, the useful explanation is this:

The developer-level question is simple: can we keep straightforward blocking code while still handling high concurrency without hiding the real bottleneck?

A practical starting point:

  • Measure database pools, remote client pools, carrier pinning, latency, and memory before and after the change.
  • Put the experiment behind tests, a small benchmark, or a compatibility CI lane.
  • Score it honestly: watch throughput, P95/P99 latency, database pool pressure, thread pinning, and memory under load.

The trap:

Do not assume virtual threads fix a slow database, under-sized pool, or accidental synchronized bottleneck.

My architect note: Concurrency changes deserve load tests and failure tests, not just prettier source code.

When a platform feature removes custom code, the real win is usually fewer private conventions to maintain.

#Java #VirtualThreads #Backend