Skip to content

Commit

Permalink
docs: update docs before May, June and July (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
yzeng25 authored Nov 1, 2021
1 parent c22151d commit 1c64e7b
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ keywords:
- APISIX
- Apache APISIX
- Envoy
- Envoy filter
description: Envoy is an L7 proxy and communication bus designed for large modern service oriented architectures. A pluggable filter chain mechanism allows filters to be written to perform different tasks and inserted into the main server.
tags: [Technology]
---
Expand Down
23 changes: 10 additions & 13 deletions website/blog/2020/12/18/first-look-at-kubernetes-service-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ tags: [Technology]
<!--truncate-->

> Source:
>
> - https://github.com/apache/apisix
> - https://github.com/apache/apisix-ingress-controller
## Preface

The author is an Apache APISIX PMC and Apache APISIX Ingress Controller Founder. Through research and community communication, I plan to gradually support Kubernetes Service APIs in later versions of Apache APISIX Ingress Controller.
Expand Down Expand Up @@ -57,7 +52,7 @@ matches:

2. The Service APIs propose the concept of multi-layer APIs, each layer exposes its interface independently to facilitate other custom resources to interface with the APIs and achieve finer granularity (API granularity) control.

! [api-model](https://gateway-api.sigs.k8s.io/images/api-model.png)
![api-model](https://gateway-api.sigs.k8s.io/images/api-model.png)

3. Role-oriented RBAC: One of the ideas behind the multi-tier API implementation is to design resource objects from the user's perspective. These resources are ultimately mapped to common roles for running applications on Kubernetes.

Expand All @@ -73,21 +68,21 @@ GatewayClass, Gateway, Route

- A GatewayClass defines a set of gateways that share the same configuration and behavior. Each GatewayClass will be handled by a single controller, and controllers have a one-to-many relationship with GatewayClass.

- A GatewayClass is a cluster resource. At least one GatewayClass must be defined to have a functional gateway. 2.
- A GatewayClass is a cluster resource. At least one GatewayClass must be defined to have a functional gateway.

Gateway requests a point at which traffic can be converted to services within the cluster.
2. Gateway requests a point at which traffic can be converted to services within the cluster.

- Role: Bringing traffic from outside the cluster inside the cluster. This is the true ingress entity.

- It defines a request for a specific LB configuration that is also the implementation of the GatewayClass configuration and behavior.

- Gateway resources can be created either directly by the operator or by the controller handling the GatewayClass.

- (b) Gateway and Route are in a many-to-many relationship.
- Gateway and Route are in a many-to-many relationship.

3. the Route describes how traffic passing through the gateway is mapped to a service.

! [schema-uml](https://gateway-api.sigs.k8s.io/images/schema-uml.svg)
![schema-uml](https://gateway-api.sigs.k8s.io/images/schema-uml.svg)

In addition, the Kubernetes Service APIs define a BackendPolicy resource object in order to enable flexible configuration of backend services.

Expand All @@ -97,11 +92,11 @@ The BackendPolicy object allows you to configure TLS, health checks, and specify

Kubernetes Service APIs, as an implementation standard, brings the following changes.

1. generality: there can be multiple implementations, just like there are multiple implementations of ingress. ingress controllers can be customized based on the characteristics of the gateway, but they all have a consistent configuration structure. A data structure, you can configure a variety of ingress controller. 2.
1. generality: there can be multiple implementations, just like there are multiple implementations of ingress. ingress controllers can be customized based on the characteristics of the gateway, but they all have a consistent configuration structure. A data structure, you can configure a variety of ingress controller.

Class concept: GatewayClasses can be configured for different types of load balancing implementations. These class classes allow the user to easily and explicitly understand what functionality can be used as the resource model itself. 3.
2. Class concept: GatewayClasses can be configured for different types of load balancing implementations. These class classes allow the user to easily and explicitly understand what functionality can be used as the resource model itself.

By allowing independent routing resources HTTPRoute to be bound to the same GatewayClass, they can share load balancers and VIPs. layered by user, this allows teams to safely share infrastructure without having to care about the specific implementation of the lower level Gateway. 4.
3. By allowing independent routing resources HTTPRoute to be bound to the same GatewayClass, they can share load balancers and VIPs. layered by user, this allows teams to safely share infrastructure without having to care about the specific implementation of the lower level Gateway. 4.

4. backend references with types: With backend references with types, routes can reference Kubernetes Services, or any type of Kubernetes resource designed as a gateway backend, such as a pod, or a statefulset such as a DB, or even an accessible cluster external resource.

Expand Down Expand Up @@ -155,3 +150,5 @@ Reference:

- https://gateway-api.sigs.k8s.io/
- https://www.apiseven.com/zh/blog/a-first-look-at-kubernetes-service-api
- https://github.com/apache/apisix
- https://github.com/apache/apisix-ingress-controller
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tags: [Interview]

> Recently, Pengcheng Wang, a senior security consultant from PwC's South China Data Security and Privacy team, reported the first CVE for Apache APISIX to the National Information Security Vulnerability Sharing Platform (CNVD) and the Apache Software Foundation: Apache APISIX Admin API Default Token Vulnerability (CVE-2020- 13945). To thank Pengcheng for his contribution to the Apache APISIX community, we also had an interview with Pengcheng.
<! --truncate-->
<!--truncate-->

## Contributor Profile

Expand All @@ -25,7 +25,7 @@ Pengcheng Wang is a senior security consultant in PwC South China data security

**Editor**: Congratulations to Pengcheng! And thank you for your contribution to the Apache APISIX community! Can you tell us a little bit about yourself and your team?

**I'm Pengcheng Wang, from the PwC Guangzhou Data Security and Privacy team, providing data security and privacy consulting services to PwC clients. As a security consultant and open source technology enthusiast, I am quite excited to help the team get the first CVE and also make a little contribution to Apache APISIX.
**Pengcheng**: I'm Pengcheng Wang, from the PwC Guangzhou Data Security and Privacy team, providing data security and privacy consulting services to PwC clients. As a security consultant and open source technology enthusiast, I am quite excited to help the team get the first CVE and also make a little contribution to Apache APISIX.

**Editor**: PricewaterhouseCoopers is an accounting firm in most people's mind, but I didn't expect that it also provides professional security services. How did you learn about Apache APISIX?

Expand All @@ -41,6 +41,6 @@ Pengcheng Wang is a senior security consultant in PwC South China data security

## First CVE for Apache APISIX

The first CVE for Apache APISIX: Apache APISIX Admin API Default Token Vulnerability (CVE-2020-13945). [Security Vulnerability Details](https://nvd.nist.gov/vuln/detail/CVE-2020-13945)
The first CVE for Apache APISIX: Apache APISIX Admin API Default Token Vulnerability (CVE-2020-13945), see [Security Vulnerability Details](https://nvd.nist.gov/vuln/detail/CVE-2020-13945) for detail.

! [2021-01-11-1](/img/blog_img/2021-01-11-1.png)
![2021-01-11-1](/img/blog_img/2021-01-11-1.png)
9 changes: 3 additions & 6 deletions website/blog/2021/01/21/run-ingress-apisix-on-amazon-eks.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ tags: [Practical Case]
<!--truncate-->

> Source:
>
> - https://github.com/apache/apisix
> - https://github.com/apache/apisix-helm-chart
> - https://github.com/apache/apisix-ingress-controller
This post is based on [Install Ingress APISIX on Amazon EKS](http://apisix.apache.org/docs/ingress-controller/deployments/aws/).

Amazon Elastic Kubernetes Service ([Amazon EKS](https://amazonaws-china.com/eks/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc&eks-blogs.sort-by=item.additionalFields.createdDate&eks-blogs.sort-order=desc)) gives you the flexibility to start, run, and scale Kubernetes applications in the AWS cloud or on-premises. This article explains how to run Ingress APISIX on it.
Expand Down Expand Up @@ -153,3 +147,6 @@ If the Service type is `ClusterIP,` you have to login to a pod in the EKS cluste

- https://www.apiseven.com/zh/blog/a-first-look-at-kubernetes-service-api
- https://www.apiseven.com/zh/blog/another-way-to-implement-envoy-filter
- https://github.com/apache/apisix
- https://github.com/apache/apisix-helm-chart
- https://github.com/apache/apisix-ingress-controller
50 changes: 24 additions & 26 deletions website/blog/2021/02/08/stable-product-delivery-with-cypress.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ keywords:
- APISIX
- Apache APISIX
- Helm Chart
description: This article explains how Yi Sun, GitHub ID [@LiteSun](https://github.com/LiteSun), Apache APISIX Committer from [Shenzhen Zhiliu Technology Co.](https://www.apiseven.com/), implements stable product delivery with Cypress.
description: This article explains how Yi Sun, GitHub ID [@LiteSun](https://github.com/LiteSun), Apache APISIX Committer from [API7.ai](https://www.apiseven.com/), implements stable product delivery with Cypress.
tags: [Technology]
---

> This article explains how Yi Sun, GitHub ID [@LiteSun](https://github.com/LiteSun), became Apache APISIX Committer from [Shenzhen Zhiliu Technology Co.](https://www.apiseven.com/), implements stable product delivery with Cypress.
> This article explains how Yi Sun, GitHub ID [@LiteSun](https://github.com/LiteSun), became Apache APISIX Committer from [API7.ai](https://www.apiseven.com/), implements stable product delivery with Cypress.
<!--truncate-->

Expand Down Expand Up @@ -68,35 +68,33 @@ Cypress's documentation structure is clearer and more comprehensive. In the earl

There are currently 49 test cases written for the APISIX Dashboard. We configured the corresponding CI in GitHub Action to ensure that the code passes before each merge to ensure code quality. We share the use of Cypress in APISIX Dashboard with you by referring to Cypress best practices and combining them with our project.

![image](https://static.apiseven.com/202102/apisix-dashboard-e2e.gif)

![image](https://static.apiseven.com/202102/image.png)

1. Commonly used functions are encapsulated into commands.

Take login as an example, login is an essential part of entering the system, so we encapsulate it as a command, so that the login command can be called before each case run.

```javaScript
Cypress.Commands.add("login", () => {
cy.request(
"POST",
'http://127.0.0.1/apisix/admin/user/login',
{
username: "user",
password: "user",
}
).then((res) => {
expect(res.body.code).to.equal(0);
localStorage.setItem("token", res.body.data.token);
Take login as an example, login is an essential part of entering the system, so we encapsulate it as a command, so that the login command can be called before each case run.

```javaScript
Cypress.Commands.add("login", () => {
cy.request(
"POST",
'http://127.0.0.1/apisix/admin/user/login',
{
username: "user",
password: "user",
}
).then((res) => {
expect(res.body.code).to.equal(0);
localStorage.setItem("token", res.body.data.token);
});
});
});
```
```

```javaScript
beforeEach(() => {
// init login
cy.login();
})
```javaScript
beforeEach(() => {
// init login
cy.login();
})
```

2. Extract the selector and data as public variables.
Expand Down Expand Up @@ -133,4 +131,4 @@ At present, APISIX Dashboard has written 49 test cases. In the future, we will c

Welcome to join us to polish the world-class gateway product.

Project address: [https://github.com/apache/apisix-dashboard](https://github.com/apache/apisix-dashboard)
Project repository: [https://github.com/apache/apisix-dashboard](https://github.com/apache/apisix-dashboard)
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ description: A few days ago, Zhiliu Inc released an online Helm Charts repositor
tags: [Practical Case]
---

> A few days ago, [Shenzhen Zhiliu Technology Co.](https://www.apiseven.com/) released an online Helm Charts repository. Users can easily install Apache APISIX, Apache apisix-dashboard and Apache apisix-ingress-controller from it (rather than cloning the corresponding project in advance).
> A few days ago, [API7.ai](https://www.apiseven.com/) released an online Helm Charts repository. Users can easily install Apache APISIX, Apache apisix-dashboard and Apache apisix-ingress-controller from it (rather than cloning the corresponding project in advance).
<!--truncate-->

> Source:
>
> - https://github.com/apache/apisix
> - https://github.com/apache/apisix-helm-chart
## How To Use

Just a few steps to install Apache APISIX
Expand Down Expand Up @@ -60,6 +55,7 @@ Just a few steps to install Apache APISIX
echo http://$NODE_IP:$NODE_PORT
```

## See Also
## Reference

- https://github.com/apache/apisix-helm-chart
- https://github.com/apache/apisix
2 changes: 1 addition & 1 deletion website/blog/2021/05/25/Apache APISIX 2.6.0-Release.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For example, developers are not familiar with Lua and want to write plugins in a

Starting from version 2.6, APISIX supports running plugins written in languages other than Lua with the help of plugin runner. The architecture diagram is as follows.

! [2021-05-25-1](/img/blog_img/2021-05-25-1.png)
![2021-05-25-1](/img/blog_img/2021-05-25-1.png)

APISIX will run the plugin runner as a sidecar.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ tags: [Interview]

> This interview features two students who participated in last year's programming summer, both of whom are now Apache APISIX committers and mentors for this year's community project
<! --truncate-->
<!--truncate-->

## Guest speaker: Shuyang Wu

[yiyiyimu](https://static.apiseven.com/202108/1630546588578-2d8386cd-06c0-4c71-848a-8ed0e1263a4e.png)
![yiyiyimu](https://static.apiseven.com/202108/1630546588578-2d8386cd-06c0-4c71-848a-8ed0e1263a4e.png)

**Q: Shuyang, please briefly introduce yourself.**

Expand Down
4 changes: 2 additions & 2 deletions website/blog/2021/06/06/apisix-two-years.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ tags: [Release]

> Apache APISIX is open for 2 years!
<! --truncate-->
<!--truncate-->

Today is June 6, 2021, and on this 666th day [Apache APISIX](https://github.com/apache/apisix) is 2 years old! 🎉

Apache APISIX was open sourced on June 6, 2019, and entered the Apache Incubator in October of the same year, and has become an **Apache top project** in just two years!

Before entering the Apache Incubator, Apache APISIX had just over 20 contributors, and now there are 249 contributors to projects related to Apache APISIX, a 10-fold increase in **contributors** in a year and a half! The Apache APISIX community is also very active, with **249 contributors submitting 2303 PRs as of today, and a new release every month**.

![2019.6.6 ~ 2021.6.6 contributor growth curve](https://static.apiseven.com/202108/1630116210945-cdf0888f-c823-4eae-b404-3b1d6cb1b1e6. png)
![2019.6.6 ~ 2021.6.6 contributor growth curve](https://static.apiseven.com/202108/1630116210945-cdf0888f-c823-4eae-b404-3b1d6cb1b1e6.png)

In life, when you go to buy airline tickets, swipe Weibo, or buy milk tea, the critical traffic behind it is handled by Apache APISIX. In the past two years, Apache APISIX has been widely used by many enterprises, covering finance, Internet, manufacturing, retail, operators, etc., such as NASA in the US, Digital Factory in the EU, China Airlines, Tencent, Huawei, Weibo, Shell House, China Mobile, Taikang, 360, Nespresso Tea, etc. Click to view [list of users of Apache APISIX](https://github.com/apache/apisix).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Let’s get started, first we go to the official website to find the most versio
- Test method 1: single-core run for side-by-side comparison (since they are both based on epoll IO model, single-core crush test is used to verify their processing power).
- Test method 2: using multicore to run a side-by-side comparison, mainly to verify whether their overall processing power can grow linearly under the scenario of adding more (processes|threads).

## 测试场景
## Test Scenarios

We built an upstream server with NGINX, configured it with 2 workers, and received a request to directly answer 4k content, with the following reference configuration:

Expand Down Expand Up @@ -131,7 +131,7 @@ static_resources:
max_retries: 1000000000
```

The generate_request_id, dynamic_stats and circuit_breakers sections above are turned on by default inside Envoy, but they are not used in this compression test and need to be turned off explicitly or set to oversize thresholds to improve performance. (Can someone explain to me why this is so complicated to configure -_-!)
The `generate_request_id`, `dynamic_stats` and `circuit_breakers` sections above are turned on by default inside Envoy, but they are not used in this compression test and need to be turned off explicitly or set to oversize thresholds to improve performance (Can someone explain to me why this is so complicated to configure...).

## Results

Expand All @@ -155,7 +155,7 @@ Latency: Latency per request, the smaller the value the better. It represents ho

We can see that the difference between the two metrics in the single-worker thread|process mode, QPS and Latency is not large, but with the increase in the number of threads|processes their gap is gradually enlarged, here I analyze that there may be two reasons, NGINX in the high concurrency scenario with multiple workers and the system IO model for interaction is not more advantageous, on the other hand, also On the other hand, NGINX itself may be more “stingy” in terms of memory and CPU usage in its implementation, so that the cumulative performance advantage can be evaluated in detail later.

## 总结
## Conclusion

In general, Apache APISIX is slightly better than Envoy in terms of response latency and QPS, and due to NGINX’s multi-worker collaboration method, which is more advantageous in high concurrency scenarios, Apache APISIX’s performance improvement is more obvious than Envoy’s after opening multiple worker processes. The bus design of Envoy gives it a unique advantage in handling east-west traffic, while the performance and latency of Apache APISIX gives it a massive throughput capability in handling north-south traffic.
Apache APISIX
Loading

0 comments on commit 1c64e7b

Please sign in to comment.