You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/29 14:59:33 UTC

[GitHub] [apisix-website] Boburmirzo commented on a diff in pull request #1304: doc: Add new blog post about FIT with API Gateway

Boburmirzo commented on code in PR #1304:
URL: https://github.com/apache/apisix-website/pull/1304#discussion_r957453438


##########
blog/en/blog/2022/08/28/fault-injection-testing-with-api-gateway.md:
##########
@@ -0,0 +1,202 @@
+---
+title: "Fault Injection Testing with API Gateway"
+authors:
+  - name: Bobur Umurzokov
+    title: Author
+    url: https://github.com/Boburmirzo
+    image_url: https://avatars.githubusercontent.com/u/14247607
+keywords: 
+- API gateway
+- Apache APISIX
+- Testing
+- Fault Injection
+- Microservices
+description: 
+The blog post describes how an **API Gateway** like [Apache APISIX](https://apisix.apache.org/) is useful for testing the robustness and resilience of microservices APIs. Throughout the post, we also get to know the types of possible failure injections with the **[Fault Injection Plugin](https://apisix.apache.org/docs/apisix/plugins/fault-injection/)** 🔌 and simulate failures on our existing [Product backend service](https://github.com/Boburmirzo/apisix-dotnet-docker/tree/main/ProductApi) (developed by using [ASP.NET Core WEB API](https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-6.0)).
+tags: [Case Studies]
+---
+
+> 💁 This blog post describes how an **API Gateway** like [Apache APISIX](https://apisix.apache.org/) is useful for testing the robustness and resilience of microservices APIs.
+
+<!--truncate-->
+
+## Explore distributed system stability💪
+
+[Distributed systems](https://azure.microsoft.com/en-us/resources/designing-distributed-systems/) such as [microservices](https://docs.microsoft.com/en-us/azure/architecture/guide/architecture-styles/microservices) have led to an increase in the complexity of the systems we work with. It is difficult to have full confidence in this architecture when there are many components and “a lot of moving parts” that could potentially fail. It is critical to handle failures in service-to-service calls gracefully. Also, we want to be sure that any resilience mechanisms we have in place such as error handling code, [circuit breaker](https://dev.to/apisix/implementing-resilient-applications-with-api-gateway-circuit-breaker-ggk), [health checks](https://dev.to/apisix/implementing-resilient-applications-with-api-gateway-health-check-338c), [retry](https://docs.microsoft.com/en-us/azure/architecture/patterns/retry), fallback, redundant instances, and so on. We can verify this with the help of t
 he testing method **[Fault Injection](https://en.wikipedia.org/wiki/Fault_injection)** 💉.
+
+![Fault Injection Testing with Apache APISIX](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/afe53i95g4tt82rx8gwp.jpg)
+
+### Here is a quick overview of what we cover👇
+
+- ✅ [Software Fault Injection](https://www.intechopen.com/chapters/56668).
+- ✅ Fault injection testing (FIT) with API Gateway.
+- ✅ Apache APISIX [Fault Injection Plugin](https://apisix.apache.org/docs/apisix/plugins/ltfa -injection/).
+- ✅ Fault injection different types of failures.
+- ✅ Experiment with Fault Injection Plugin.
+
+> Application is **correct** if it acts as specified. It is **robust** if it can take a high load until it goes down. Application is **resilient** if it can go back to normal after a disruption.
+
+## Software Fault Injection 💻💉
+
+Among the many methods to perform Fault Injection, the technique of **Software Fault Injection** is especially getting more popular among companies managing large, complex, and distributed systems. In this sort of software testing technique, a special piece of code, associated with the system under test, tries to simulate faults. It is normally completed before deployment to identify any potential flaws that might happen in the running software😱. Fault injection can better identify the nature and cause of production failures.
+
+## Fault Injection Testing with API Gateway
+
+The **fault injection** approach at the [API Gateway](https://apisix.apache.org/docs/apisix/terminology/api-gateway/) level can be used to test the resiliency of application or microservices APIs against various forms of failures to build confidence in the production environment. The technique can be used to inject delays and abort requests with user-specified error codes, thereby providing the ability to stage different failure scenarios such as service failures, service overloads, high network latency, network partitions, etc. Fault injection can be limited to a specific set of requests based on the (destination) upstream cluster of a request and/or a set of pre-defined request headers.
+
+For a streaming giant like [Netflix](https://www.netflix.com/), the migration to a complex cloud-based microservices architecture would not have been possible without a revolutionary testing method known as fault injection👊. There is a very well-known strategy like [Chaos engineering](https://en.wikipedia.org/wiki/Chaos_engineering) which uses fault injection to accomplish the goal of more reliable systems. And Netflix teams built their own _Chaos engineering tool_ called [Chaos Monkey](https://netflix.github.io/chaosmonkey/).
+
+## Apache APISIX Fault Injection Plugin🔌
+
+[Apache APISIX Fault Injection Plugin](https://apisix.apache.org/docs/apisix/plugins/fault-injection/) also offers a _mechanism_ to inject some errors into our APIs and ensures that our resilience measures are effective.
+
+Apache APISIX works in **two different modes**, both configured using the `fault-injection` plugin attributes⤵️:
+
+1. **Delays:** Delays are timing failures. They simulate increased network latency or an overloaded upstream service.
+
+2. **Aborts:** Aborts are crash failures. They mimic failures in upstream services. Aborts usually manifest in the form of HTTP error codes or TCP connection failures.
+
+For detailed instructions on how to configure delays and aborts, see [Fault Injection](https://apisix.apache.org/docs/apisix/plugins/fault-injection/). You can also try out a centralized platform [API7 Cloud](https://www.api7.cloud/) ☁️ to use more advanced API Gateway [features](https://www.api7.cloud/docs/overview/api7-cloud). API7 Cloud provides a fully managed chaos engineering service with the dashboard to configure the [Fault Injection policy](https://www.api7.cloud/docs/references/policies/traffic-management/fault-injection) easily👍🏻.

Review Comment:
   Ahaa:)) It is a cloud icon but not clear right?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org