I'm exploring the idea of implementing chaos engineering techniques using feature flags, specifically for failure injections like adding latency, causing API timeouts, or simulating dependency errors. The concept of having a deploy-free way to inject these issues with a feature flag seems beneficial, but I wonder how it overlaps with existing mechanisms like automatic circuit breakers. I'm curious about how to effectively integrate feature flags and kill switches with chaos experiments and circuit breakers. What are your thoughts?
4 Answers
I actually think using dependency injection within your integration tests might be the way to go. You can mock high latency scenarios and effectively test your circuit breakers without adding too much complexity to your setup.
Ideally, chaos should be injected at the infrastructure level. That's the essence of chaos testing—doing it at that level ensures you're really testing the resilience of your services under chaotic conditions.
Using feature flags for chaos engineering can be tricky. While it might seem like a convenient solution, I think it's better to stick with dedicated chaos engineering tools like Gremlin or Litmus. These tools are designed for this purpose, and they work well with cloud-level services like AWS Fault Injection Simulator (FIS).
If you're looking for a straightforward method, consider using a Layer 7 proxy. You can route all outgoing traffic through it and tweak the middleware to introduce response errors or delays as needed. It's a simple setup that allows for chaos testing without too much complexity.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically