OCI or Azure: Which offers the best value for serverless container instances?

December 7, 2022 | 11 minute read
Brian Wood
Product Marketing (AI for AppDev)
Text Size 100%:

Responding to ever-increasing customer adoption of microservices and container-based applications, we’ve recently announced the general availability of Oracle Cloud Infrastructure (OCI) Container Instances service.

OCI Container Instances is a serverless compute service that enables you to easily run containers without managing any infrastructure. You can focus on building your applications without having to worry about provisioning, patching, or managing servers. You can easily deploy one or more containers with the flexibility to specify compute shape, resource allocation, networking, and other optional configurations.

With OCI Container Instances, you only pay for compute and memory resources allocated to your container instance at the same price as the “regular” OCI Compute Instances for the chosen shape, such as if you chose to deploy containers on virtual machines (VMs) that you provision and manage yourself. In other words, the seamless operations provided by the serverless solution incur no extra charges.

With better performance, security, and identical price as do-it-yourself operations, letting go of the management overhead is an easy decision. These features makes OCI Container Instances not only the simplest, most reliable option for running containers in the cloud, but also the best value from an overall total cost of ownership perspective.

smiling man

Comparing OCI Container Instances to Azure Container Instances

While not identical, the most similar offering from Microsoft Azure is Azure Container Instances, which allows you to run containers in Azure without having to provision VMs. Both OCI’s and Azure’s container runtime services enable you to focus on designing and building your applications instead of managing the infrastructure that runs them.

With the features and benefits of both services being quite similar, customers often want to jump straight to the bottom line: How do the services compare on cost? Which is the better choice for your serverless container needs?

In this blog post, we explore a few common workload scenarios that illustrate the “apples-to-apples” cost comparison between Azure Container Instances and OCI Container Instances. We first describe the prices and billing metrics listed for each service.

All calculations use prices published as of December 1, 2022. Common cloud industry practice is to define compute instances based on the number of virtual CPUs they include. Each vCPU provides the capacity for one thread of runs. A vCPU does not provide a whole physical compute core but is instead part of a core. In contrast, Oracle’s x86 compute shapes use OCPUs, which equate to physical CPU cores, each of which provides for two threads. So, two vCPUs on Azure compare to 1 OCPU on OCI.

Comparing prices: Azure versus OCI

Azure Container Instances pricing gives the following information:

  • “You are charged based on the vCPU request for your container group rounded up to the nearest whole number for the duration (measured in seconds) your instance is running. You are also charged for the GB request for your container group rounded up to the nearest tenths place for the duration (measured in seconds) your container group is running.”

  • “For each container group, you can allocate a minimum of 1 vCPU and 1 GB, up to 7 GBs of memory to each vCPU. You can allocate up to 4 vCPU to each container group you deploy.”

Pricing for OCI Container Instances offers the following straightforward message:

  • “Customers only pay for the infrastructure resources allocated by the container instances. The price for OCPU and memory resources allocated to a container instance is the same as the price of OCI compute instances for the chosen shape. There are no additional charges for using container instances.”

  • “You can allocate all the CPU and memory provided by the underlying compute shape to a container instance to run even the most demanding workloads. For example, you can allocate up to 64 cores (128 vCPU) and 1024 GB memory to a container instance with E3/E4 Flex shapes.”

Note that OCI offers substantially higher resource allocation capabilities than Azure does. You get 32-times higher compute capacity with OCI than Azure (128 vCPU versus 4 vCPU) and you get 37-times higher memory capacity with OCI than Azure (1024 GB versus 28 GB).

These enormous capability gaps create material differences in the size and complexity of container-based applications that can be deployed by serverless compute. We'll come back to this area shortly.

The real prices of serverless containers

The following table shows the lowest on-demand rates available for Linux-based containers using Azure and OCI Container Instances. Although Azure’s pricing varies widely by region show Azure Container Instances in its best light we’re using US East region rates because they’re Azure’s lowest.

Comparison of container instances pricing

Attribute

Unit

Azure

OCI

Bottom line

Compute

per vCPU per hour

$0.04050

$0.0125

Azure is 3.2x more expensive than OCI

Memory

per GB per hour

$0.00445

$0.0015

Azure is 3.0x more expensive than OCI

Bottom line: Azure’s lowest prices for serverless compute and memory are still 3.2 and 3 times higher than Oracle’s.

As noted above, Azure’s pricing varies widely by region and the rates for Azure Container Instances in most other Azure regions are much higher than in Azure US East:

  • 15% higher in West US, Korea Central

  • 20% higher in Central US, Canada East, UAE Central, Australia East

  • 25% higher in UK West, France Central, Japan East, Southeast Asia

  • 35% higher in Korea South, South Africa North

  • 45% higher in Australia Southeast

  • 51% higher in Switzerland West, East Asia

  • 65% higher in Norway West

  • 81% higher in Australia Central

  • 90% higher in South Africa West

  • 100% higher in Brazil South

OCI offers consistent pricing and availability of all services, including OCI Container Instances, across all global regions. This consistency makes it easy for you to plan and budget for rapid geographic expansion, regardless of where you need to consume the cloud services.

Keeping these caveats in mind, the real cost for each serverless container service is calculated as follows:

Total price = Compute fee + Memory fee

where

  • Compute fee = (# instances) * (vCPU/instance) * (vCPU-duration) * (Compute-price-per-vCPU-hour)

  • Memory fee = (# instances) * (GB/instance) * (GB-duration) * (Memory-price-per-GB-hour)

two men talking in a conference room

Comparing costs for three common use cases

Now that we know how to calculate the respective service prices, we’re ready for comparing the true cost of real-world use cases. We'll use three representative scenarios to illustrate common container-based workloads.

Scenario A: ETL batch jobs

In this use case, we’re using a single container instance with a 2-vCPU, 4-GB configuration running batch extract, transform, load (ETL) workloads, 12 times per day with a duration of five minutes each run time for 30 days.

Azure Container Instances:

  • Compute = (1 instance) * (2 vCPU per instance) * (12 runs per day) * (5 minutes per run) * (30 days) * ($0.0405 per vCPU-hour) = $2.43

  • Memory = (1 instance) * (4 GB per instance) * (12 runs per day) * (5 minutes per run) * (30 days) * ($0.00445 per GB-hour) = $0.53

  • Total = $2.43 + $0.534 = $2.96 for Azure Container Instances

OCI Container Instances:

  • Compute = (1 instance) * (2 vCPU per instance) * (12 runs per day) * (5 minutes per run) * (30 days) * ($0.0125 per vCPU-hour) = $0.75

  • Memory = (1 instance) * (4 GB per instance) * (12 runs per day) * (5 minutes per run) * (30 days) * ($0.0015 per GB-hour) = $0.18

  • Total = $0.75 + $0.18 = $0.93 for OCI Container Instances

Azure Container Instances is 3.2 times more expensive than the equivalent using OCI Container Instances.

Cost comparison for ETL batch job use case

Azure Container Instances

OCI Container Instances

Bottom line

$2.96

$0.93

Azure is 3.2x more expensive than OCI

Scenario B: Web application for loyalty club program

In this scenario, we’re using two container instances, each with 4 vCPU and 28 GB configuration running primary-secondary containerized web application 24 x 7 for 30 days.

Azure Container Instances:

  • Compute = (2 instances) * (4 vCPU per instance) * (24 hours per day) * (30 days) * ($0.0405 per vCPU-hour) = $233.28

  • Memory = (2 instances) * (28 GB per instance) * (24 hours per day) * (30 days) * ($0.00445 per GB-hour) = $179.42

  • Total = $233.28 + $179.42 = $412.70 for Azure Container Instances

OCI Container Instances:

  • Compute = (2 instances) * (4 vCPU per instance) * (24 hours per day) * (30 days) * ($0.0125 per vCPU-hour) = $72.00

  • Memory = (2 instances) * (28 GB per instance) * (24 hours per day) * (30 days) * ($0.0015 per GB-hour) = $60.48

  • Total = $72.00 + $60.48 = $132.48 for OCI Container Instances

Azure Container Instances is 3.1 times more expensive than the equivalent using OCI Container Instances.

Cost comparison for web application use case

Azure Container Instances

OCI Container Instances

Bottom line

$412.70

$132.48

Azure is 3.1x more expensive than OCI

Scenario C: Large legacy banking application

For this use case, a large legacy application is being containerized, which is often done prior to the work for deconstructing the app into microservices. We’re using one container instance with 16 vCPU and 120 GB running a legacy containerized banking application 24 x 7 for 30 days.

While OCI Container Instances can handle this scenario with ease, the requirement for 16 vCPU and 120 GB is well above the maximum limits for Azure Container instances (which are 4 vCPU and 28 GB). So, we cannot actually compare services in this case because Azure cannot meet the requirement. But for completeness, we'll show the costs on OCI:

  • Compute = (1 instance) * (16 vCPU per instance) * (24 hours per day) * (30 days) * ($0.0125 per vCPU-hour) = $144.00

  • Memory = (1 instance) * (120 GB per instance) * (24 hours per day) * (30 days) * ($0.0015 per GB-hour) = $129.60

  • Total = $144.00 + $129.60 = $273.60 for OCI Container Instances

Cost comparison for large legacy banking application use case

Azure Container Instances

OCI Container Instances

Bottom line

Can’t meet requirement

$273.60

Azure cannot meet the requirement

man typying on laptop

Oracle delivers over three times lower cost than Azure

The evidence is compelling and undeniable: even in Azure’s lowest-cost regions, OCI Container Instances provide a clear cost advantage over Azure Container Instances. The cost difference is even greater in most other Azure regions globally, up to a whopping 6.4x difference in the Brazil region!

OCI Container Instances offers substantially higher resource allocation capabilities than Azure Containers Instances: 32x higher compute capacity (128 vCPU versus 4 vCPU) and 37x higher memory capacity (1024 GB versus 28 GB). These savings enable customers to benefit from a superior serverless experience to support more use cases that involve larger or more complex container-based applications that are not supported on Azure.

Azure’s overall higher compute costs make for an expensive serverless container solution, and their lower capacity limits further constrain your flexibility. For these reasons, savvy customers who want to use containers and the simplified operations of serverless compute, all in a way that makes clear business sense, choose OCI over Azure. You should use other considerations besides cost when selecting any type of cloud service, of course, but such a large difference cannot be overlooked, particularly for common container-based use cases which are often prevalent throughout organizations (and typically experience continued growth).

If you want to learn more about OCI Container Instances, see the product page and try the service for yourself. You can also contact us to speak with a cloud architect to discover how OCI Container Instances can help you accelerate and simplify adoption of cloud native services and scale containers’ usage across your organization in a cost-effective way.

Brian Wood

Product Marketing (AI for AppDev)


Previous Post

First Principles: Inside OCI Container Instances

Sean Osborne | 3 min read

Next Post


Announcing support for NVIDIA AI Enterprise on OCI

Akshai Parthasarathy | 2 min read