Demo: injecting latency and packet loss with Toxiproxy
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
- Run Toxiproxy with Docker Compose; create a proxy in front of the payment provider stub.
- Point Shop's payment URL at the proxy and place an order normally.
- Add a
latencytoxic of 3 s with a 2 s client timeout; watch the order status. - Add a toxic that drops the response (for example
limit_dataorreset_peeron the downstream); check whether Payments recorded the charge. - 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).
- Write the list of inconsistencies observed.
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.