当前位置:网站首页>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 比较

- 请求延迟比较

总结
边栏推荐
- SkiaSharp 之 WPF 自绘 拖曳小球(案例版)
- Array collation commonly used in PHP
- OSPF expansion configuration, routing principles, anti ring and re release
- pkg打包node工程
- 【MySQL】Got an error reading communication packets
- Experiment 5: user and user group management
- 【学习笔记】border与period
- Include and require include_ Once and require_ Once difference
- uni-app进阶之创建组件/原生渲染
- JWT login authentication + token automatic renewal scheme, well written!
猜你喜欢

为报复公司解雇,我更改了项目的所有代码注释!

Read Plato farm's eplato and the reason for its high premium

Xiao Hei stands up again and looks at leetcode:653. Sum of two IV - enter BST

2022-uni-app解析token标准的方式-使用jsrsasign-爬坑过了
![[OpenHarmony] [RK2206] 构建OpenHarmony编译器 (二)](/img/0c/2e8290403d64ec43d192969f776724.png)
[OpenHarmony] [RK2206] 构建OpenHarmony编译器 (二)

二分、三分、01分数规划 【第I弹】
![[jzof] 14 cut rope](/img/36/6f58b443a549ad245c1c4cfe5d13af.png)
[jzof] 14 cut rope
![[learning notes] border and period](/img/a4/5493f7eefc7dd0e38bc9a53a92b87b.png)
[learning notes] border and period

二分、三分、01分数规划【第III弹】

这种动态规划你见过吗——状态机动态规划之股票问题(中)
随机推荐
How PHP gets the interface
为什么要考一级建造师,一建证书含金量有多高?
线程同步volatile与synchronized详解
Thinking and summary of technical personnel | R & D Efficiency
Introduction to evaluatorfilter
银行入职考试要点汇总
ES(8.1)认证题目
Array collation commonly used in PHP
建筑建材行业B2B电子商务网站方案:赋能建材企业转型升级,实现降本提效
[esp32][esp idf] esp32s3 quickly build lvglv7.9
2022-uni-app解析token标准的方式-使用jsrsasign-爬坑过了
为报复公司解雇,我更改了项目的所有代码注释!
PHP 基础
JWT 登录认证 + Token 自动续期方案,写得太好了!
基于ModelArts续写最伟大的作品【玩转华为云】
ES (8.1) certification topic
Edge team explains how to improve the comprehensive performance experience through disk cache compression technology
LSA and optimization of OSPF
Platofarm has made continuous progress, and has launched the official version and super primitive NFT successively
Redis设计规范