Chaos Engineering is a way to test your application's resilience to network failures. We will use a cloud-based Chaos Proxy to inject failures into real network requests without changing a single line of application code.Chaos Engineering is a way to test your application's resilience to network failures. We will use a cloud-based Chaos Proxy to inject failures into real network requests without changing a single line of application code.

No Need to Mock All the Time: A Better Way to Test API Resilience in Your Terminal

2025/12/05 06:45

"It works on my machine."

\ We've all said it. But does your bash script work when the third-party API takes 15 seconds to respond? Does your backend service gracefully handle a sudden spike of 503 errors from a payment provider?

\ Writing a full mock server just to test a simple retry logic in a script is often overkill. In this tutorial, I'll show you a faster way: Chaos Engineering directly in the terminal.

\ We will use curl and a cloud-based Chaos Proxy to inject failures into real network requests without changing a single line of your application code.

The Problem: Localhost is Too Perfect

When developing locally, network latency is near zero. APIs either work (200 OK) or they don't (Connection Refused). But in production, you face:

High Latency: The server is busy. \n Intermittent Failures: 5% of requests drop. \n Throttling: You hit the rate limit.

\ Simulating this in a terminal usually involves complex iptables rules or local tools like tc (Traffic Control). There is an easier way.

The Solution: Cloud Chaos Proxy

Instead of configuring your OS, we will route specific requests through a proxy that "breaks" the traffic according to rules we define.

\ I'll be using chaos-proxy.debuggo.app for this, but the concept applies to any programmable proxy.

Video Guide (1:27)

Prefer watching? Here is the 90-second workflow:

https://www.youtube.com/watch?v=x_S-guPwPEk&embedable=true

Step-by-Step Tutorial

1. Define the Failure

First, we need to tell the proxy what to break.

  • Target: httpbin.org (or your API domain).
  • Delay: 7 seconds (Simulate lag).
  • Failure Rate: 1 (100% of requests will fail).
  • Error Code: 503 Service Unavailable.

2. Trust the Certificate (The "One-Time" Setup)

Since we are intercepting HTTPS traffic, we need to trust the proxy's CA certificate.

\ Download the mitmproxy-ca-cert.pem from the dashboard.

\ MacOS: Add it to Keychain Access -> System and set "Always Trust."

\ Linux: Copy to /usr/local/share/ca-certificates/ and update.

3. The Magic Command

Now, we use curl with the -x(proxy) flag. \n

curl -v -x http://user:pass@chaos-proxy.debuggo.app:13979 https://httpbin.org/get

Understanding the Output

When you run this command multiple times:

Scenario A (The Chaos): You'll notice the terminal "hangs" for 7 seconds (our delay). Then:

< HTTP/1.1 500 Internal Server Error < content-length: 56 < content-type: text/plain ... Debuggo Chaos Injection: 500 Error

\ Scenario B (Success): The other 50% of the time, the request passes through to the real server: \n

< HTTP/1.1 200 OK ... { "args": {}, "headers": { ... } }

Real World Use Cases

  1. Testing CI Pipelines: Verify that your deployment scripts don't crash if a dependency is slow.
  2. Cron Jobs: Ensure your nightly data sync retries correctly on failure.
  3. Quick Sanity Checks: Before pushing code, verify how the API client handles a 503 error.

Conclusion

You don't need heavy infrastructure to test network resilience. A simple proxy setup allows you to inject chaos into any HTTP client—be it curlwget, or your Python/Node.js scripts.

\ Happy Breaking! 🔨

Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

US Dollar Index (DXY) hovers near multi-week low ahead of US PCE data

US Dollar Index (DXY) hovers near multi-week low ahead of US PCE data

The post US Dollar Index (DXY) hovers near multi-week low ahead of US PCE data appeared on BitcoinEthereumNews.com. The US Dollar Index (DXY), which tracks the Greenback against a basket of currencies, struggles to capitalize on the overnight bounce from its lowest level since late October and trades with a mild negative bias during the Asian session on Friday. The index is currently placed around the 99.00 mark, down less than 0.10% for the day, as traders now await the crucial US inflation data before placing fresh directional bets. The September US Personal Consumption Expenditure (PCE) Price Index will be published later today and will be scrutinized for more cues about the Federal Reserve’s (Fed) future rate-cut path. This, in turn, will play a key role in determining the next leg of a directional move for the Greenback. In the meantime, dovish US Federal Reserve (Fed) expectations overshadow Thursday’s upbeat US labor market reports and continue to act as a headwind for the buck. Recent comments from several Fed officials suggested that another interest rate cut in December is all but certain. The CME Group’s FedWatch Tool indicates an over 85% probability of a move next week. Furthermore, reports suggest that White House National Economic Council Director Kevin Hassett is seen as the frontrunner to become the next Fed Chair and is expected to enact US President Donald Trump’s calls for lower rates, which, in turn, favors the USD bears. Nevertheless, the DXY remains on track to register losses for the second straight week, and the fundamental backdrop suggests that the path of least resistance for the index remains to the downside. Hence, any attempted recovery is more likely to get sold into and remain limited. US Dollar Price Last 7 Days The table below shows the percentage change of US Dollar (USD) against listed major currencies last 7 days. US Dollar was the strongest against the Swiss…
Share
BitcoinEthereumNews2025/12/05 13:43
SSP Stock Surges 11% On FY25 Earnings And European Rail Review

SSP Stock Surges 11% On FY25 Earnings And European Rail Review

The post SSP Stock Surges 11% On FY25 Earnings And European Rail Review appeared on BitcoinEthereumNews.com. SSP Group stock rebounded strongly today. (Photo Illustration by Pavlo Gonchar/SOPA Images/LightRocket via Getty Images) SOPA Images/LightRocket via Getty Images Shares in travel food retailer SSP Group rose sharply today after the company posted solid FY25 results, highlighting good growth in two of its four regional divisions, and a decision to review its under‑performing Continental European rail business. The food and beverage (F&B) company’s stock closed 11.3% up in London on the back of a revenue rise of 7.8% (at constant currency) to £3.6 billion ($4.8 billion) in the 12 months to September. Operating profit jumped by 12.7% to £223 million ($298 million). Under statutory IFRS reporting, however, operating profit fell 58% to £86 million, which SSP said in a statement “reflected £183 million of non‑underlying expenses and impairment charges.” The decision to review its rail business in Continental Europe—the biggest of the F&B giant’s four divisions by revenue at £1,205 million ($1,607 million)—was welcomed by the market, given its weak performance of 2% like-for-like (LFL) growth. A carrot was also dangled— a reward to shareholders arising from the July IPO of SSP’s Indian joint venture Travel Food Services (TFS) with K Hospitality, India’s largest privately held F&B company. SSP Group CEO Patrick Coveney said in a statement: “We acknowledge there is more to do to strengthen our operational performance, most notably in Continental Europe, where we have now reset our team, model, and balance sheet, and have a range of initiatives underway. In addition, we are launching a wide-ranging review of our rail business in Continental Europe. We are also considering options to realise value for our shareholders in line with the delivery of the TFS free float requirement.” SSP currently retains a 50.01% stake in TFS and said: “We believe that India’s market potential, combined with TFS’s attractive…
Share
BitcoinEthereumNews2025/12/05 13:37
‘Love Island Games’ Season 2 Release Schedule—When Do New Episodes Come Out?

‘Love Island Games’ Season 2 Release Schedule—When Do New Episodes Come Out?

The post ‘Love Island Games’ Season 2 Release Schedule—When Do New Episodes Come Out? appeared on BitcoinEthereumNews.com. LOVE ISLAND GAMES — Episode 201 — Pictured: Ariana Madix — (Photo by: Ben Symons/PEACOCK via Getty Images) Ben Symons/PEACOCK via Getty Images We’ve got a text! It’s time for another season of Love Island Games. With fan-favorites returning in hopes of winning the $250,000 cash prize, read on to learn more about Love Island Games Season 2, including the release schedule so you don’t miss a second of drama. Love Island Games is a spinoff in the Love Island franchise that first premiered in 2023. The show follows a similar format to the original series, but with one major twist: all contestants are returning Islanders from previous seasons of Love Island from around the world, including the USA, UK, Australia and more. Another big difference is that games take on much more importance in Love Island Games than the mothership version, with the results “determining advantages, risks, and even who stays and who goes,” according to Peacock. Vanderpump Rules star Ariana Madix is taking over hosting duties for Love Island Games Season 2, replacing Love Island UK star Maya Jama who hosted the first season. Iain Stirling returns as the show’s narrator, while UK alum Maura Higgins will continue to host the Saturday show Love Island: Aftersun. ForbesWho’s In The ‘Love Island Games’ Season 2 Cast? Meet The IslandersBy Monica Mercuri Jack Fowler and Justine Ndiba were named the first-ever winners of Love Island Games in 2023. Justine had previously won Love Island USA Season 2 with Caleb Corprew, while Jack was a contestant on Love Island UK Season 4. In March 2024, Fowler announced on his Instagram story that he and Justine decided to remain “just friends.” The Season 2 premiere revealed the first couples of the season: Andrea Carmona and Charlie Georgios, Andreina Santos-Marte and Tyrique Hyde,…
Share
BitcoinEthereumNews2025/09/18 04:50