Skip to content
Ameen Abozaid
Planned lessonMID-007-L06

Demo: platform vs virtual threads under load

  • Lesson 6 of 6
  • Mid-level
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

  1. Start Shop with 200 platform request threads; the endpoint calls a supplier with 500 ms latency and one DB query.
  2. Run a load test with 1,000 concurrent clients; record throughput, p95 latency, and pool metrics.
  3. Enable virtual threads, restart, and repeat.
  4. Observe higher throughput, then database pool saturation (connections pending).
  5. Planned mistake: also raise the DB pool to 1,000 "to fix it" and hit database limits. Fix: keep a sized pool or a Semaphore guard; accept queueing in the right place.
  6. Summarize: the bottleneck moved from threads to the database.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.