background

In April, Microsoft announced a preview of its family of Azure virtual machines based on Ampere® Altra® Arm processors. The new VM series includes general-purpose Dpsv5 and memory-optimized Epsv5. For details, refer to the following figure:

img

Notably, Ampere® Altra® Arm is a cloud-native processor, so Azure virtual machines based on Ampere® Altra® Arm processors can run scale-out cloud-native applications in an efficient manner.

So how about the actual experience and performance? Next, we will take a cloud-native API gateway as an example to show you the performance of the Azure virtual machine based on the ARM architecture. Here, we choose Apache APISIX to install and test on the general-purpose Dpdsv5 series virtual machine.

Apache APISIX is a cloud-native, high-performance, scalable API gateway. Based on NGNIX + LuaJIT and etcd, APISIX has the characteristics of dynamic routing and plug-in hot loading compared with traditional API gateways, which is especially suitable for API management under cloud native architecture.

img

Preliminary preparation

First, we start an instance of the Dpdsv5 series on Azure, and choose Ubuntu 20.04 as the operating system.

img

Then install Docker to facilitate subsequent deployment of Apache APISIX in a containerized manner.

 sudo apt-get update && sudo apt-get install docker.io

Deploy Apache APISIX

  1. Apache APISIX uses etcd as the configuration center, so you need to start an etcd instance first.
 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
  1. Start an instance of Apache APISIX.
 sudo docker run --net=host -d apache/apisix:2.14.1-alpine
  1. Create routes.
 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
        }
    }
}'
  1. Access the test.
 curl -i http://127.0.0.1:9080/anything/das

If the following result is returned, the installation is successful:

 HTTP/1.1 200 OK
.....

Azure Ddsv5 vs Azure Dpdsv5

From the above operations, the installation and compatibility test of Apache APISIX on Azure Dpdsv5 can be successfully completed. So what is the actual performance of Azure Dpdsv5? Next, we will use Apache APISIX to do performance test comparison on Azure Dpdsv5 and Azure Ddsv5 to see the actual performance.

Azure Ddsv5 is another model of the Azure D series and is based on Intel® x86 architecture, so the above etcd installation steps are slightly different:

 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

For simplicity, only one Worker is enabled in this test APISIX, and the following performance test data are run on a single-core CPU.

Scenario 1: Single upstream

In this scenario, a single upstream (without any plugins) will be used to test the performance of APISIX in pure proxy back-to-origin mode. Test in local environment:

 # 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
        }
    }
}'

Scenario 2: Single upstream + two plugins

In this scenario, a single upstream and two plug-ins will be used, mainly to test the performance of APISIX when two core performance-consuming plug-ins, limit-count and prometheus are enabled.

 # 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
        }
    }
}'

data comparison

In the above two scenarios, relevant tests and comparisons were carried out from the two levels of request QPS (queries per second) and delay time . The result is as follows:

  1. QPS comparison

img

  1. Request Latency Comparison

img

single upstream Single upstream + two plugins
Azure Ddsv5 Azure Dpdsv5 Azure Ddsv5 Azure Dpdsv5
QPS(request/sec) 14900 13400 13100 11000
Latency(ms) 1.07 1.21 1.21 1.43

It can also be seen from the above data that in network IO-intensive computing scenarios such as API gateways, Dpdsv5 still has a performance gap compared to the same series of Ddsv5. But the good news is that in the case of the same configuration, the price of Dpdsv5 is about 20% cheaper than that of Ddsv5. In the actual machine selection, users can make flexible decisions according to their own business volume.

Summarize

This article mainly uses Apache APISIX to compare the performance of Azure Ddsv5 and Azure Dpdsv5. It can be seen from the results that although the performance of Azure Dpdsv5 is not so bright compared to Ddsv5, since this series of models is still in the preview version, Microsoft is making continuous improvements and optimizations, and we are also looking forward to its follow-up performance.


API7_技术团队
99 声望45 粉丝

API7.ai 是一家提供 API 处理和分析的开源基础软件公司,于 2019 年开源了新一代云原生 API 网关 -- APISIX 并捐赠给 Apache 软件基金会。此后,API7.ai 一直积极投入支持 Apache APISIX 的开发、维护和社区运营...