[DOCKER] Comparison of Web App for Containers and Azure Container Instances

This article is Request! Cloud Native application development tips![PR] It is his 22nd day of Microsoft Japan Advent Calendar 2020 (I will write it later).


In this article, I'd like to compare the seemingly similar Web App for Containers (https://azure.microsoft.com/ja-jp/services/app-service/containers/?WT.mc_id=AZ-MVP-5001601) with Azure Container Instances (https://azure.microsoft.com/ja-jp/services/container-instances/?WT.mc_id=AZ-MVP-5001601).

What is Web App for Containers

Web App for Containers is a service that uses a Docker image as an execution image for Azure Web Apps. Since it is an instance of Web Apps, you can use various functions such as Web Apps URL and https.

As you can see from App Service Prices and Features, Basic and above service plans support Web App for Containers, so for Linux, East Japan, and B1 (vCPU 1, RAM 1.75 GB) * * It costs about 2,000 yen per month **.

What is Azure Container Instances

Azure Container Instances (https://azure.microsoft.com/ja-jp/services/container-instances/?WT.mc_id=AZ-MVP-5001601) is a service for isolated container scenarios such as simple applications, task automation, and build jobs.

As you can see from Azure Container Instances Pricing and Features, it's not easy to understand ...

Price example
Example 1:
1 vCPU, 1 month period(30 days)Suppose you create a Linux container group that configures 1 GB once a day. Each container group is used for 5 minutes(300 seconds)is.

Memory usage time:
Number of container groups*Memory usage time(Seconds) * GB * GB Secondsあたりの料金 *Days
1 container group*300 seconds* 1 GB *¥ 0 per GB second.0001721 *30 days= ¥1.549
vCPU usage time:
Number of container groups*vCPU usage time(Seconds) * vCPU * vCPU Secondsあたりの料金 *Days
1 container group*300 seconds* 1 vCPU *vCPU ¥ 0 per second.0015743 *30 days= ¥14.168
Total billing:
Memory usage time(Seconds) +vCPU usage time(Seconds) =Total charge
¥1.549 + ¥14.168 = ¥15.717

Compared to Web App for Containers (https://azure.microsoft.com/ja-jp/services/app-service/containers/?WT.mc_id=AZ-MVP-5001601?), suppose you create a Linux container group with one vCPU and a configuration of 1.75 GB once a day for a period of one month (30 days). The usage time for each container group is calculated as 1440 minutes (86400 seconds) ,

Memory usage time:
Number of container groups*Memory usage time(Seconds) * GB * GB Secondsあたりの料金 *Days
1 container group*86400 seconds* 1.75 GB(*1) *¥ 0 per GB second.0001721 *30 days= ¥780.6456
vCPU usage time:
Number of container groups*vCPU usage time(Seconds) * vCPU * vCPU Secondsあたりの料金 *Days
1 container group*86400 seconds* 1 vCPU *vCPU ¥ 0 per second.0015743 *30 days= ¥4080.5856
Total billing:
Memory usage time(Seconds) +vCPU usage time(Seconds) =Total charge
¥780.6456 + ¥4080.5856 = ¥4861.2312
*1:Since it is in GB, 1.I don't think you can choose 75 GB, but for comparison

It will be ¥ 4861.2312.

As you can see, for services that are always running, Web App for Containers is suitable, and it is supported by development (dev), test (test), staging (stg) environment, and Azure Functions. For services that are used in spots such as long batch processing that cannot be done, you will find that Azure Container Instances (https://azure.microsoft.com/ja-jp/services/container-instances/?WT.mc_id=AZ-MVP-5001601) is suitable.

Recommended Posts

Comparison of Web App for Containers and Azure Container Instances
MicroProfile Config operation verification in Azure Web App for Containers environment
Azure Container Instances! Lightweight and explosive container usage!
[For beginners] Explanation of classes, instances, and statics in Java
Overview of Docker and containers
Comparison of WEB application development with Rails and Java Servlet + JSP
Comparison of compression libraries for JavaVM
Classes and instances Java for beginners
Comparison of processing speed between Stream including cast and extended for statement
A brief summary of DI and DI containers
Comparison of Android Handler Looper and runOnUiThread
Thorough comparison of Android and iOS implementations
Develop Nerves apps with Azure Container Instances
[Java / Swift] Comparison of Java Interface and Swift Protocol
Comparison of JavaScript objects and Ruby classes
About the mechanism of the Web and HTTP