当前位置:网站首页>API 网关 APISIX 在Google Cloud T2A 和 T2D 的性能测试
API 网关 APISIX 在Google Cloud T2A 和 T2D 的性能测试
2022-07-28 09:56:00 【InfoQ】
背景

前期准备

sudo apt-get update && sudo apt-get install docker.io
部署 Apache APISIX
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
sudo docker run --net=host -d apache/apisix:2.14.1-alpine
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
}
}
}'
curl -i http://127.0.0.1:9080/anything/das
HTTP/1.1 200 OK
.....
Google Cloud T2D vs Google Cloud T2A
sudo docker run -d --name etcd \
-p 2379:2379 \
-e ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 \
-e ALLOW_NONE_AUTHENTICATION=yes \
-e ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379 \
bitnami/etcd:3.4.16
场景一:单上游
# apisix: 1 worker + 1 upstream + no plugin
# 注册路由
curl http://127.0.0.1:9080/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/hello",
"plugins": {
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:1980":1
}
}
}'
场景 2:单个上游 + 两个插件
limit-countprometheus# apisix: 1 worker + 1 upstream + 2 plugins (limit-count + prometheus)
# 注册路由
curl http://127.0.0.1:9080/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"uri": "/hello",
"plugins": {
"limit-count": {
"count": 2000000000000,
"time_window": 60,
"rejected_code": 503,
"key": "remote_addr"
},
"prometheus": {}
},
"upstream": {
"type": "roundrobin",
"nodes": {
"127.0.0.1:1980":1
}
}
}'
数据比较
- QPS 比较

- 请求延迟比较

总结
边栏推荐
- 我用小程序容器让移动研发效率提升了5倍!
- [esp32][esp idf] ap+sta realizes wireless bridging and transferring WiFi signals
- ELK实时日志分析平台
- Illustrate three mainstream enterprise architecture models (recommended collection!)
- B2B2C系统亮点是什么?如何助力珠宝首饰企业打造全渠道多商户商城管理体系
- Extreme deflation and perpetual motion machine model will promote the outbreak of platofarm
- PHP connection MySQL native code
- 双指针技巧
- [openharmony] [rk2206] build openharmony compiler (2)
- 【云驻共创】企业数字化转型,华为云咨询与你同行
猜你喜欢

图解 3 种主流企业架构模式(建议收藏!)

ES(8.1)认证题目
![[esp32][esp idf] esp32s3 quickly build lvglv7.9](/img/39/8efef047d0a9223b97819a54b5edf8.png)
[esp32][esp idf] esp32s3 quickly build lvglv7.9

2021.07.13 我们是这样崩的
![[esp32][esp idf] ap+sta realizes wireless bridging and transferring WiFi signals](/img/bf/0a968064a8f7c11b86a2a2820208e6.png)
[esp32][esp idf] ap+sta realizes wireless bridging and transferring WiFi signals
![[ESP32][esp-idf][LVGL7.9] 使用oled iic编译失败](/img/16/e5aa43df6ef9bdbc173fa547c85559.png)
[ESP32][esp-idf][LVGL7.9] 使用oled iic编译失败

选择供应商服务系统,是大健康产业企业迈向数字化转型的第一步

ADVANCE.AI出海指南助力企业出海印尼,掌握东南亚市场半边天

Illustrate three mainstream enterprise architecture models (recommended collection!)

二分、三分、01分数规划【第III弹】
随机推荐
uni-app进阶之生命周期
In the era of home health diagnosis, Senzo creates enhanced lateral flow test products
LinkedList源码按摩,啊舒服
Read Plato farm's eplato and the reason for its high premium
基于ModelArts续写最伟大的作品【玩转华为云】
Being on duty less than 8 hours a day and being dismissed? Tencent's former employees recovered 13million overtime pay, etc., and the court won a compensation of 90000 in the final judgment
Arthas tutorial
office2013以上输入数学公式
Bit.store, which has attracted much attention, is at a glance of the latest developments
安装gmp
PHP连接mysql原生代码
为什么要考一级建造师,一建证书含金量有多高?
Status Notice ¶
LandingSite电子标签Quuppa固件进入DFU状态说明
为报复公司解雇,我更改了项目的所有代码注释!
What are the highlights of B2B2C system? How to help jewelry enterprises build an omni channel multi merchant mall management system
这种动态规划你见过吗——状态机动态规划之股票问题(中)
【JZOF】15二进制中1的位数
二分、三分、01分数规划 【第I弹】
Platofarm has made continuous progress, and has launched the official version and super primitive NFT successively