Hi everyone,
I’m currently building a live electricity price-tracking dashboard: https://sahkotanaan.fi/. The core of the app relies on a regional utility API that publishes new exchange rates exactly once per hour.
Because the third-party API has incredibly strict rate limits, I’ve set up a middleware caching layer. My server runs a cron job at the top of the hour, fetches the new JSON payload, caches it, and my frontend tools only ever talk to my cache.
The architecture works, but I am struggling with how to properly test edge cases—specifically the “cache stampede” scenario. I need to simulate a spike of concurrent users hitting my endpoints at exactly the top of the hour when the cache is invalidating and fetching the new data.
My main concern is doing this without accidentally letting a test script slip through and hammer the real third-party API, which would get my production IP blacklisted.
For those of you who manage time-sensitive proxy setups, I’d love to get your thoughts:
- How do you approach mocking a strict, time-based third-party API in Postman so you can safely load test your own middleware?
- Do you have a specific Postman/Newman workflow you use to simulate concurrent requests hitting at the exact moment a cache expires?
- Do you usually build the mock server to simulate the latency of the third-party API to see how your backend handles the pending frontend requests?
Thanks in advance!