virtual threads don't remove your bottlenecks, they move themwith a regular tomcat setup you had 200 threads, so at most 200 requests were in flight at onceturn on spring.threads.virtual.enabled and that cap becomes tomcat's max-connections, 8192 by default. thousands of requests in flight, each on its own virtual thread, all happy to waityour DB itself is still protected, hikari's pool (10 connections by default) was always the real limit there. what changes is the line in front of it. before, at most 200 threads could wait for a connection. now it can be thousands, and once the wait goes past connectionTimeout (30s by default) requests start failing instead of just being slowdownstream calls with no limit of their own feel it the most. the API you call just got a lot more concurrent traffic from you what to think about before flipping the flag:how long a request should wait for a DB connection, and what happens when it can't get onelimits on downstream calls. JEP 444 suggests a Semaphore, not pooling virtual threads. just remember it's per instance, so 50 permits on 6 pods is 300 callsa timeout on every downstream call, or one hung request keeps its permit forever load testing with realistic concurrency, not just measuring throughput
Çok fazla virtual thread varsa işlemleri sınırlandırmak için Semaphore kullanılır.