Back to Browse

Spring Boot + Tomcat: Why Microservices Devs Hate Tomcat's Thread Pool 😡 | Thread-Per-Request Model

8.0K views
Aug 3, 2025
58:23

Ever wondered why your Spring Boot app slows down even with just a few users? In this deep dive, we explore the thread-per-request model used by Tomcat, how it handles concurrent user requests, and what goes wrong when your application starts making blocking REST calls. We'll simulate a real-world microservice scenario where slow APIs and a saturated Tomcat thread pool choke your app's performance — even when traffic is light. You’ll learn: ✅ How Tomcat handles threads internally ✅ What happens when your app hits thread exhaustion ✅ Why blocking I/O (like RestTemplate) is dangerous in microservices ✅ Why developers misunderstand RestClient ✅ How to debug and analyze thread dumps in IntelliJ ✅ The real performance limits of the thread-per-request model ⏱️ Timestamps: 01:05 – What is Thread-Per-Request Model? 05:27 – How Tomcat Handles Concurrent Requests 12:26 – Creating a Simple Spring Boot Project (Producer) 14:48 – Tomcat Worker Threads / Thread Pool 18:24 – Server Thread Debugging in IntelliJ 24:15 – Building the Consumer Microservice 28:12 – Making a Blocking REST Call with RestTemplate 34:13 – Checking the Thread Dump (WAITING, TIMED_WAITING States) 35:34 – Tomcat Connection Pooling (Limit Threads to 2) 38:49 – How Tomcat Handles Load 41:51 – How a Slow Microservice Affects Healthy Apps 45:47 – RestTemplate vs RestClient 47:38 – What is a Fluent API? 49:39 – Common Misconception: RestClient is Still Blocking 54:58 – Final Thoughts You'll also learn how to analyze thread states and perform thread dump debugging using both IntelliJ and Eclipse, so you can clearly see what’s happening inside your Spring Boot application under load. This video is a great resource if you're preparing for Spring Boot Interviews , performance tuning or system design interviews, especially when it comes to understanding thread-per-request model challenges in real-world microservices. For More free/paid courses visit www.seleniumexpress.com #springboot #tomcat #microservices #javathreads #springbootmicroservices 🎓 Related Courses – For reference 📘 Java Streams & Lambda Expressions https://www.youtube.com/watch?v=nQ4B_EWnAvI&list=PL3NrzZBjk6m-jblxwCFWxtvCeYGv05rmj ⚡ Reactive Java with Project Reactor https://www.youtube.com/watch?v=-AnAd7rR2Qk&list=PL3NrzZBjk6m-RrIn2ndllgEnIHpOmz2v3 🔁 Generics in Java Explained https://www.youtube.com/watch?v=V-Sg8K4oINU&list=PL3NrzZBjk6m8BqPhWC700B1TnG9XUlLdT 🌐 Spring Boot Crash Course https://www.youtube.com/watch?v=F_rGkDeihBg&list=PL3NrzZBjk6m-P7k8tmq1wJOdJ0_ZpPxbp ▶️ Spring Boot Microservices https://www.youtube.com/watch?v=T2rBkbT50TE&list=PL3NrzZBjk6m_n8QZCdnF7Yax36cqWkO9j ▶️ Apache Kafka Essentials https://www.youtube.com/watch?v=MkcrLzbu9tc&list=PL3NrzZBjk6m_dQzvBuD6Yn9Tj9xNTmyhl ▶️ Spring Bootcamp (FREE) https://www.youtube.com/watch?v=ZTv6uQ2AlA8&list=PL3NrzZBjk6m_7F2vyEW8DWmUTmnkb_IS3 ▶️ Spring Live Mock Interview https://www.youtube.com/watch?v=yX2w-Sof95s&list=PL3NrzZBjk6m_Md4nG1uF5113-Z0yVRoA0 Feel free to ask for support. Email me at [email protected] For More free/paid courses visit www.seleniumexpress.com Facebook https://www.facebook.com/seleniumexpress Facebook support Group “SeleniumExpress - Support" https://www.facebook.com/groups/187000222361579/ Follow me on Insta https://www.instagram.com/selenium_express/ 🔔 Subscribe for More

Download

1 formats

Video Formats

360pmp4113.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Spring Boot + Tomcat: Why Microservices Devs Hate Tomcat's Thread Pool 😡 | Thread-Per-Request Model | NatokHD