Skip to content
Ameen Abozaid
Planned lessonMID-023-L06

Demo: injecting latency and packet loss with Toxiproxy

  • 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

reproduce failures on purpose. Prepares MID-023-LAB1.

Draft outline details

Step by step

  1. Run Toxiproxy with Docker Compose; create a proxy in front of the payment provider stub.
  2. Point Shop's payment URL at the proxy and place an order normally.
  3. Add a latency toxic of 3 s with a 2 s client timeout; watch the order status.
  4. Add a toxic that drops the response (for example limit_data or reset_peer on the downstream); check whether Payments recorded the charge.
  5. Planned mistake: retry blindly on timeout and show a double charge in the stub's records. Fix with an idempotency key (preview of MID-029).
  6. Write the list of inconsistencies observed.

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.