We had the same problem. Ring handlers performed longer running tasks, all 4 httpkit threads were occupied, the health checks failed, Kubernetes started to restart web servers, uptime alerts got triggered.
Solved it by using virtual threads (JEP 425: Virtual Threads (Preview)). It still in preview mode and part of JDK 19 that is probably GA in September. However is running fine for several weeks now ![]()
I thought long about this problem and if I should use an early access JDK version in production. But virtual threads are the only solution that I found that solves this problem at the right level. It is transparent to the programmer and it does not add accidental complexity like async code.
You can pass the :worker-pool option to httpkit and add (Executors/newVirtualThreadPerTaskExecutor) as value.