Share This Page

ShareShareShareShare
Author: Sharan Gowde |08/20/19

Container deployment on Azure functions, ACI and AKS

Abstract

Cloud provides multiple services where an application can be deployed. One of the difficulties of deploying of an application is to decide where to deploy it on. Currently, docker containers can be deployed in the several azure services such as Functions, Azure Container Instance (ACI), Azure Kubernetes Services and Web Apps.

Let’s compare Azure ACI, AKS and Functions.

Introduction

• Containers

In the traditional software development approach, often something that works in one environment does not work in some other environment. Containerization of application helps overcoming this problem. Containerizing an application mainly involves packaging an application with all the configurations, libraries and all the dependencies required the application to run smoothly across any environment. The most popular eco-system for containers is Docker. Docker can be run on Kubernetes, which is an open-source container orchestration system for automating application deployment, scaling, and management.

Azure Kubernetes Service (AKS) is fully managed service that makes deploying and managing containerized application easy. Serverless Kubernetes provides enterprise grade security and governance

Azure Container Instance (ACI) fastest and simplest way to run the containers in azure without provisioning and managing servers. ACI increase the agility with containers on demand, ACI provisions additional compute as the workload increases. ACI secures the application with the hypervisor isolation.

Azure Function is a serverless compute service that enables to run the code on demand without having to explicitly provision or manage infra. Azure function provides the facility to deploy and run the code either on windows or Linux environment, for the Linux environment either we can directly publish the code or run under the Docker containers

Method and Tools used for Experiment

Application: .Net core API app being developed for inserting and extracting the data from the SQL

The Docker container being stored in the Azure Container registry (ACR) and Azure SQL server being used for the data storing and retrieving. Jmeter is used for the load testing.

Capacity Planning:

SQL azure configured with the S2 with 20 DTU during the performance benchmarking.

AKS: DS2 service machine used with 2 CPU and 7 GB RAM. The containers are allocated 128mb memory in all the cases and up to 5 pods with single container were used.

ACI: single core CPU with 1.5 GB memory and GPU type none

Azure Function: P1V2 series machine are used which has 1 Vcpu and 3.5GB RAM

Environment Planning:

All the Azure Service AKS, ACI and Function hosted on the central US region and tried to keep the server configuration same across all the servers.

Jmeter is being used for performance testing and we have made sure that all the azure services are tested within the same time with the same load capacity.

Jmeter hosted in 3 VM located in the central US.

JMeter is used for load testing. We used three levels of testing:

  1. 50 threads/sec, 5 sec ramp-up time for 10 minutes
  2. 500 threads/sec, 15 sec ramp-up time for 10 minutes
  3. 1000 threads/sec, 30 sec ramp-up time for 10 minutes

Data obtained from Experiments

The data obtained from experiment is based on response received from the HTTP request that we send using JMeter. JMeter evaluates Number of Samples, Average, Min, Max, Std. Dev., Error percentage, Throughput, Received KB/sec, Sent KB/sec, Avg. Bytes for the request we send.

Experiment 1: Using Function

The experiment involves creating the Azure function with the Http Triggering, and uses the app service plan for hosting.

1.1 Post Call

1. At low load of 50 threads/sec and Ramp-up period of 5 for post operation

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 146797 201 30 5240 112.61 0.00% 244.5916 37.98 56.13 159
TOTAL 146797 201 30 5240 112.61 0.00% 244.5916 37.98 56.13 159

CPU Utilization:

Post call CPU Utilization

Memory Utilization

Memory Utilization

2. At medium load of 500 threads/sec and Ramp-up period of 10 for post operation

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 146780 1908 45 18069 1374.95 0.00% 243.8194 37.86 55.95 159
TOTAL 146780 1908 45 18069 1374.95 0.00% 243.8194 37.86 55.95 159

CPU Utilization:

At medium load of 500 threads/sec CPU Utilization

Memory Utilization:

At medium load of 500 threads/sec Memory Utilization

3. At high load of 1000 threads/sec and Ramp-up period of 10 minutes, for Post call

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 139603 3640 29 64214 6662.75 0.00% 230.3482 35.77 52.86 159
TOTAL 139603 3640 29 64214 6662.75 0.00% 230.3482 35.77 52.86 159

CPU Utilization:

At high load of 1000 threads/sec CPU Utilization

Memory Utilization:

At high load of 1000 threads/sec Memory Utilization

1.2 Get Call

1. At low load of 50 threads/sec and Ramp-up period of 5 for Get operation

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 157904 1832 22 128104 3695.57 0.00% 258.8319 40.44 38.17 160
TOTAL 157904 1832 22 128104 3695.57 0.00% 258.8319 40.44 38.17 160

CPU Utilization:

At low load of 50 threads CPU Utilization

Memory Utilization:

At low load of 50 threads Memory Utilization

2. At medium load of 500 threads/sec and Ramp-up period of 10 for Get call operation

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 153775 2655 21 129537 5382.54 0.00% 248.5584 40.44 38.92 160
TOTAL 153775 2655 21 129537 5382.54 0.00% 248.5584 40.44 38.92 160

CPU Utilization:

At low load of 50 threads CPU Utilization

Memory Utilization:

At medium load of 500 threads/sec and Ramp-up period Memory Utilization

3. At high load of 1000 threads/sec and Ramp-up period of 10 minutes, for Get call

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 148926 3783 21 132793 8827.82 0.01% 246.543 38.53 36.36 160
TOTAL 148926 3783 21 132793 8827.82 0.01% 246.543 38.53 36.36 160

CPU Utilization

At high load of 1000 threads/sec and Ramp-up period of 10 minutes CPU Utilization

Memory Utilization

At high load of 1000 threads/sec and Ramp-up period of 10 minutes Memory Utilization

Experiment 2: Using AKS (Azure Kubernetes Services)

This experiment involves creating an AKS cluster in azure. AKS pulls the image from the ACR. AKS hosted on the DS2V2 which has 2 CPU and 7 GB RAM.

2.1 Post Call

1. At low load of 50 threads/sec and Ramp-up period of 10

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 158353 893 7 83638 1746.64 2.12% 250.8364 43.53 52.94 211
TOTAL 158353 893 7 83638 1746.64 2.12% 250.8364 43.53 52.94 211

CPU-Utilization:

At low load of 50 threads node CPU Utilization

Memory-Utilization:

At low load of 50 threads node Memory Utilization

2. At medium load of 500 threads/sec and Ramp-up period of 10

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 151650 1986 7 98139 4064.6 2.52% 249.3772 47.5 45.84 212
TOTAL 151650 1986 7 98139 4064.6 2.52% 249.3772 47.5 45.84 212

CPU-Utilization:

At Medium load of 500 threads node CPU Utilization

Memory-Utilization:

At Medium load of 500 threads node Memory Utilization

3. At high load of 1000 threads/sec and Ramp-up period of 30.

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 147545 6308 7 183022 13021.16 5.95% 220.3846 77.72 24.28 562.9
TOTAL 147545 6308 7 183022 13021.16 5.95% 220.3846 77.72 24.28 562.9

CPU-Utilization:

At high load of 1000 threads node CPU Utilization

Memory-Utilization:

At high load of 1000 threads node Memory Utilization

2.2 Get Call

Results:

1. At low load of 50 threads/sec and Ramp-up period of 10.

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 345246 750 3 21690 1246.73 6.58% 573.5955 1587.03 65.41 2833.2
TOTAL 345246 750 3 21690 1246.73 6.58% 573.5955 1587.03 65.41 2833.2

CPU-Utilization:

At low load of 50 threads node CPU Utilization

Memory-Utilization:

At low load of 50 threads node Memory Utilization

2. At medium load of 500 threads/sec and Ramp-up period of 10

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 345246 750 3 21690 1246.73 6.58% 573.5955 1587.03 65.41 2833.2
TOTAL 345246 750 3 21690 1246.73 6.58% 573.5955 1587.03 65.41 2833.2

CPU Utilization:

At medium load of 500 threads node CPU Utilization

Memory Utilization:

At medium load of 500 threads node Memory Utilization

3. At high load of 1000 threads/sec and Ramp-up period of 30.

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 356315 1340 3 40618 2542.9 9.47% 590.943 1628.88 65.31 2822.6
TOTAL 356315 1340 3 40618 2542.9 9.47% 590.943 1628.88 65.31 2822.6

CPU Utilization:

At high load of 1000 threads node CPU Utilization

Memory Utilization:

At high load of 1000 threads node Memory Utilization

Experiment 3: Using ACI (Container Instance)

Container instance deployed with single core with 1.5 GB

Results:

3.1 Post Call

1. At low load of 50 threads/sec and Ramp-up period of 5.

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 147483 202 11 2382 109.83 0.00% 245.7739 38.16 56.88 159
TOTAL 147483 202 11 2382 109.83 0.00% 245.7739 38.16 56.88 159

CPU Utilization:

Using ACI At Low Load of 50 CPU Utilization

Memory Utilization:

Using ACI At Low Load of 50 Memory Utilization

2. At medium load of 500 threads/sec and Ramp-up period of 10

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 150165 1975 22 35127 2845.85 0.94% 247.7631 44.41 56.81 183.5
TOTAL 150165 1975 22 35127 2845.85 0.94% 247.7631 44.41 56.81 183.5

CPU Utilization:

Using ACI At Medium Load of 500 CPU Utilization

Memory Utilization:

Using ACI At Medium Load of 500 Memory Utilization

3. At medium load of 500 threads/sec and Ramp-up period of 5

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 155746 3782 10 161999 7810.5 5.17% 239.5687 68.67 52.58 293.5
TOTAL 155746 3782 10 161999 7810.5 5.17% 239.5687 68.67 52.58 293.5

CPU Utilization:

Using ACI At Medium Load of 500 CPU Utilization

Memory Utilization:

Using ACI At Medium Load of 500 Memory Utilization

3.2. Get Method

1. At low load of 50 threads/sec and Ramp-up period of 5.

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 365146 776 6 34329 1790.45 11.69% 608.2908 1670.55 80.27 2812.2
TOTAL 365146 776 6 34329 1790.45 11.69% 608.2908 1670.55 80.27 2812.2

CPU Utilization:

Using ACI at low Load of 50 CPU Utilization

Memory Utilization:

Using ACI at low Load of 50 Memory Utilization

2. At medium load of 500 threads/sec and Ramp-up period of 5

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 370464 954 6 75464 2317.88 12.85% 611.8737 1694.51 80.26 2711.8
TOTAL 370464 954 6 75464 2317.88 12.85% 611.8737 1694.51 80.26 2711.8

CPU Utilization

Using ACI at medium load of 500 threads CPU Utilization

Memory Utilization:

Using ACI at medium load of 500 threads Memory Utilization

3. At medium load of 500 threads/sec and Ramp-up period of 5

Label # Samples Average Min Max Std. Dev. Error % Throughput Received KB/sec Sent KB/sec Avg. Bytes
HTTP Request 381065 1443 5 105549 3551.1 15.37% 634.5732 1734.42 80.24 2798.8
TOTAL 381065 1443 5 105549 3551.1 15.37% 634.5732 1734.42 80.24 2798.8

CPU Utilization

Using ACI at medium load of 500 threads CPU Utilization

Memory Utilization:

Using ACI at medium load of 500 threads Memory Utilization

Table Comparison

For the Post Method :

Post Method

For Get Method :

Get Method

Conclusion:

Azure service performs equally during the insert operation but when we compare the read operations ACI outperform compare to other services. ACI costing based on the number of seconds a particular service runs.

READ

Let's Talk About Your Needs

Thank you for your submission. We'll be in touch.