当前位置:网站首页>Performance monster on arm64: installation and performance test of API gateway Apache APIs IX on AWS graviton3
Performance monster on arm64: installation and performance test of API gateway Apache APIs IX on AWS graviton3
2022-06-13 11:07:00 【Apacheapisik China Community】
background
AWS stay 2022 year 5 At the end of the month, the latest version based on ARM Architecturally AWS Graviton Family processor ——AWS Graviton3. According to the AWS Official data show , And Graviton2 Processor comparison , Based on leading DDR5 Memory technology ,Graviton3 The processor can provide up to 25% Performance improvement of 、 the height is 2 Times the floating-point performance and 50% Memory access speed ; The performance is similar to that of the same kind EC2 With the same instance ,Graviton3 Can also reduce 60% Energy .
So what about the actual data ? Let's take CPU intensive API For example, gateway , Let's see AWS Graviton3 How do you behave . Here we use Apache APISIX stay AWS Graviton2(C6g) and AWS Graviton3(C7g) Performance comparison test under two server environments .
Apache APISIX It's a cloud native 、 High performance 、 Extensible API gateway . be based on NGNIX+LuaJIT and etcd To achieve , And traditional API Gateway compared to ,APISIX It has the characteristics of dynamic routing and plug-in hot loading , It is especially suitable for the cloud native architecture API management .
Get ready : Installation and deployment
Before testing , It is necessary to prepare one to carry ARM64 Chip servers , Here we choose Amazon EC2 C7g( Now only this model is equipped with AWS Graviton3), The operating system chose Ubuntu 20.04.
At the same time to install Docker.
sudo apt-get update && sudo apt-get install docker.io
at present ,APISIX The latest version of ARM64 Mirror image , have access to Docker One click deployment . Refer to the following for the specific process :
- start-up etcd
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
- start-up APISIX
sudo docker run --net=host -d apache/apisix:2.14.1-alpine
- Registered routing
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 } }}'
- Access test
curl -i http://127.0.0.1:9080/anything/das
HTTP/1.1 200 OK.....
AWS Graviton2 and AWS Graviton3 Performance comparison of
According to the above operation , be based on Official script It's done APISIX stay AWS Graviton3 Installation and compatibility testing on the processor . Let's take a look Apache APISIX stay AWS Graviton2(C6g) and AWS Graviton3(C7g) Performance on .
For testing purposes , In this example APISIX Only one... Has been opened Worker, The following performance test data are in the single core CPU Running on .
Scene one : Single upstream
A single upstream... Is used in this scenario ( Does not contain any plug-ins ), Main tests APISIX Performance in pure proxy back to source mode . Testing in a local environment :
# apisix: 1 worker + 1 upstream + no plugin# Registered routing 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 } }}'
Scene two : Single upstream + Multiple plug-ins
The other scenario uses single upstream and multiple plug-ins , Two plug-ins are used here . Main tests APISIX In the open limit-count
and prometheus
Performance performance of two cores when consuming performance plug-ins .
# apisix: 1 worker + 1 upstream + 2 plugins (limit-count + prometheus)# Registered routing 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 } }}'
Data comparison
In the above two scenarios , The related tests and comparisons are carried out from the two aspects of request processing and delay time . give the result as follows :
- QPS contrast
- Latency contrast
From the data above, you can see , stay API The gateway is like this CPU In a dense computing scenario ,AWS Graviton3 Than AWS Graviton2 The performance of 76%, The delay is also reduced 38%. This figure is better than the one mentioned at the beginning AWS Official figures (25% Performance improvement ) And excellent .
summary
This paper mainly uses Apache APISIX the AWS Graviton3 And AWS Graviton2 Performance comparison of , You can see in the API gateway CPU In a dense computing scenario ,AWS Graviton3 It shows the properties of the performance monster . Of course , I also recommend you to practice more , We look forward to more test data of computing intensive projects in the future .
边栏推荐
- 阿里一季度员工减少4000人;程序员写脚本抢挂疫苗号,牟利40万被刑拘;搜狐遭遇史诗级邮件诈骗,张朝阳回应 | Q资讯
- To vent their dissatisfaction with their superiors, Baidu post-95 programmers were sentenced to 9 months for deleting the database
- D generate unique ID at compile time
- Similarities and differences between commonAPI and AUTOSAR AP communication management
- 硬件工程师薪资虚高,你认可吗?
- 【TcaplusDB知识库】TcaplusDB单据受理-建表审批介绍
- Introduction to binary tree
- Web 3.0?高成本版的P2P而已
- Database learning notes (Chapter 16)
- 微众银行OSPO建设之路:如何通过OSPO的建设推动企业开源?
猜你喜欢
为发泄对上司不满,百度95后程序员删库被判9个月
Redis相关
Talk about MySQL indexing mechanism
Navicat connection MySQL in Pagoda
State compression DP example (traveling salesman problem and rectangle filling problem)
ST表学习
作为一个测试人员,这些基础知识必不可少
【TcaplusDB知识库】Tmonitor后台一键安装介绍(二)
ue5 小知识点 geometry script modeling
关于 SAP Spartacus CmsService.getComponentData 可能的优化思路
随机推荐
第七章 文件管理作业
容斥原理(能被整除的数)
2020 ICPC Asia Taiwan Online Programming Contest C Circles
乘法逆元作用
2022 Gansu Province safety officer C certificate work certificate title and online simulation examination
View the default MySQL password in the pagoda
D generate unique ID at compile time
We spent a weekend migrating 3.7 million lines of code to typescript
Gauss elimination for solving N-element equations
宝塔访问从IP改为域名
Database learning notes (Chapter 15)
CommonAPI与AUTOSAR AP通讯管理的异同
Alibaba's employees decreased by 4000 in the first quarter; Programmers wrote scripts to hang up vaccine numbers and were arrested for making a profit of 400000 yuan; Sohu encounters epic email fraud,
DNS protocol analysis
Web 3.0?高成本版的P2P而已
《自然-通讯》| 用机器学习和时间序列数据为气候变化下的武装冲突风险建模
【TcaplusDB知识库】TcaplusDB常规单据介绍
Chapter VII document management
What is 400g Ethernet?
The road of ospo construction of Weibo: how to promote enterprise open source through ospo construction?