Closed
Description
The default behavior for jetty when used in spring boot is for the
JettyEmbeddedServletContainerFactory to create an Jetty Server with an unbounded
QueuedThreadPool.
This means that under any kind of load where the input request rates exceeds the servers ability to process that the JVM will eventually OOM no matter what.
Essentially, this is a guaranteed breakage by default.
Instead it would be better to replace the default BlockingQueue inside the QueuedThreadPool with a bounded queue, as is advised in the Jetty documentation.
This changes the default behavior to load shed (fail fast) and is far more production ready out of the box.
(See https://wiki.eclipse.org/Jetty/Howto/High_Load#Jetty_Tuning - dated by still reflected in the code.)
Metadata
Metadata
Assignees
Labels
No labels