SylviaBABY commented on code in PR #1230: URL: https://github.com/apache/apisix-website/pull/1230#discussion_r927406223
########## blog/zh/blog/2022/07/22/how-is-google-cloud-tau-t2a-performing.md: ########## @@ -0,0 +1,207 @@ +--- +title: "API 网关 APISIX 在谷歌云 T2A 和 T2D 的性能测试" +authors: + - name: "赵士瑞" + title: "Author" + url: "https://github.com/soulbird" + image_url: "https://github.com/soulbird.png" +keywords: + - APISIX + - API 网关 + - Google Cloud + - Google Cloud T2A + - ARM64 +description: 本文主要使用云原生 API 网关 Apache APISIX 分别在 Google Cloud T2A 和 Google Cloud T2D 进行性能测试,并且进行对比两者的性能。 +tags: [Technology] +--- + +> 本文主要使用 Apache APISIX 来对比 Google Cloud T2A 和 Google Cloud T2D 的性能。 + +<!--truncate--> + +## 背景 + +2022 年 7 月 13 日 Google Cloud 发布了第一个基于 Arm® 架构的 Tau T2A 的 VM 系列预览版。T2A VM 由基于 Ampere® Altra® Arm 的处理器提供支持,谷歌宣称其拥有极具吸引力的价格和卓越的单线程性能。 + +值得注意的是,Ampere® Altra® Arm 是一款云原生处理器,基于 Ampere® Altra® Arm 处理器的 Tau T2A 虚拟机也因此能以高效的方式运行横向扩展的云原生应用程序。 + +那么具体实际体验和性能如何呢?我们以一个云原生的 API 网关为例,带大家一起看看一起 Google Cloud Tau T2A 虚拟机的表现。这里,我们选择了 Apache APISIX 在 Google Cloud Tau T2A 服务器环境上进行安装测试。 + +Apache APISIX 是一个云原生、高性能、可扩展的 API 网关。基于 NGNIX + LuaJIT 和 etcd,APISIX 与传统 API 网关相比,具有动态路由和插件热加载特性,特别适合云原生架构下的 API 管理。 + + + +## 前期准备 + +首先需要在 Google Cloud 上启动一个 T2A 实例,操作系统选择 Ubuntu 20.04。 + + + +然后安装 Docker,方便后续使用容器化的方式来安装部署 Apache APISIX。 + +```shell +sudo apt-get update && sudo apt-get install docker.io +``` + +## 部署 Apache APISIX + +Apache APISIX 使用 etcd 作为配置中心,所以这里需要先启动一个 etcd 实例。 + +```shell +sudo docker run -d --name etcd \ + -p 2379:2379 \ + -e ETCD_UNSUPPORTED_ARCH=arm64 \ + -e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \ + -e ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 \ + rancher/coreos-etcd:v3.4.16-arm64 +``` + +启动 Apache APISIX 实例: + +```shell +sudo docker run --net=host -d apache/apisix:2.14.1-alpine +``` + +注册路由。 + +```shell +curl "http://127.0.0.1:9080/apisix/admin/routes/1" \ +-H "X-API-KEY: edd1c9f034335f136f87ad84b625c8f1" -X PUT -d ' +{ + "uri": "/anything/*", + "upstream": { + "type": "roundrobin", + "nodes": { + "httpbin.org:80": 1 + } + } +}' +``` + +访问测试。 + +```shell +curl -i http://127.0.0.1:9080/anything/das +``` + +```shell +HTTP/1.1 200 OK +..... +``` + +## Google Cloud T2D vs Google Cloud T2A + +从上述操作来看,Apache APISIX 在 Google Cloud Tau T2A 上的安装和兼容性测试都能顺利完成。那么 Google Cloud T2A 的实际性能到底如何呢?接下来我们将使用 Apache APISIX 分别在 Google Cloud T2A 和 Google Cloud T2D 上做性能测试对比,来看看其实际表现。 + +Google Cloud T2D 是 Google Cloud Tau 系列的另一款机型,是基于 Intel® x86 架构的, 所以上述 etcd 安装步骤略有不同: Review Comment: ```suggestion Google Cloud T2D 是 Google Cloud Tau 系列的另一款机型,是基于 Intel® x86 架构的,所以上述 etcd 安装步骤略有不同: ``` -- 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-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org