Demo: platform vs virtual threads under load
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
measure the effect on Shop's slow-supplier endpoint; prepares MID-007-LAB1.
Draft outline details
Step by step
- Start Shop with 200 platform request threads; the endpoint calls a supplier with 500 ms latency and one DB query.
- Run a load test with 1,000 concurrent clients; record throughput, p95 latency, and pool metrics.
- Enable virtual threads, restart, and repeat.
- Observe higher throughput, then database pool saturation (connections pending).
- Planned mistake: also raise the DB pool to 1,000 "to fix it" and hit database limits. Fix: keep a sized pool or a
Semaphoreguard; accept queueing in the right place. - Summarize: the bottleneck moved from threads to the database.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.