Understanding Azure Service Bus Cost and Billing

Author

Reads 489

Computer server in data center room
Credit: pexels.com, Computer server in data center room

Azure Service Bus is a cloud-based messaging service that helps you integrate different applications and services. It's a powerful tool, but understanding its cost and billing can be a bit tricky.

You'll be charged for the resources you use, such as the number of messages sent and received, and the amount of storage used for queues and topics.

The cost of Azure Service Bus is based on a pay-as-you-go model, which means you only pay for what you use. This can be a big advantage for developers and businesses who need to scale quickly.

To give you a better idea, the cost of Azure Service Bus is typically around $0.000004 per message for standard tier, and $0.000008 per message for premium tier.

Bus Pricing

Azure Service Bus pricing is based on two main meters: Messaging Operations and Brokered Connections.

For queues and topics/subscriptions, Messaging Operations are defined as API calls against queue or topic/subscription service endpoints. This meter will replace messages sent or received as the primary unit of billable usage for queues and topics/subscriptions.

Additional reading: Azure Messaging Services

Credit: youtube.com, AZ 305 — Azure Service Bus Pricing

The Standard tier introduces graduated pricing for operations performed with queues and topics/subscriptions, resulting in volume-based discounts of up to 80% at the highest usage levels. There is also a Standard tier base charge of $10 per month, which enables you to perform up to 12.5 million operations per month at no additional cost.

You can choose a service tier for each Service Bus service namespace that you create, and this tier selection applies across all queues, topics/subscriptions, relays, and Event Hubs created within that namespace. The Basic tier does not support topics/subscriptions, while the Standard/Premium tiers do.

Bus Pricing FAQ

Service Bus pricing is structured in a way that charges you for the actual usage of your resources. You can choose from three service tiers: Basic, Standard, and Premium.

The Basic tier is the most cost-effective option, but it lacks some advanced features like topics/subscriptions and relays.

The Standard tier introduces graduated pricing for operations performed with queues and topics/subscriptions, resulting in volume-based discounts of up to 80% at the highest usage levels.

Computer server in data center room
Credit: pexels.com, Computer server in data center room

There is a Standard tier base charge of $10 per month, which enables you to perform up to 12.5 million operations per month at no additional cost.

The Premium tier provides resource isolation at the CPU and memory layer so that each customer workload runs in isolation.

You can purchase 1, 2, or 4 messaging units for each Service Bus Premium namespace.

Here's a summary of the functional differences between the Basic and Standard/Premium tiers:

The Premium tier is currently in preview and the price reflects a 50% preview discount.

Bus Storage Fees

You won't be charged for storage in Service Bus, but there is a quota limiting the maximum amount of data that can be persisted per queue/topic.

Service Bus doesn't charge for storage, which is a relief for developers who want to focus on building their applications without worrying about extra costs.

You'll find more details about Service Bus quotas in the next FAQ, so be sure to check that out for more information.

Data transfers outside of the data center where your application is provisioned are charged, but storage itself is not.

A fresh viewpoint: Azure Storage Service

Event Hubs

Credit: youtube.com, AZ 305 — Azure Event Hub Pricing

Event Hubs is a service that's specifically built to handle high-volume event streams, and it can take on many incoming messages with exceptional ingress rates.

It stores those messages internally, offering no queue semantics, but it's highly optimized for its one job – storing events to allow later processing by consumers on their terms.

Consumers manage events by reading and deciding where to move the reading cursor forward or go back to already read messages, which comes with the responsibility to manage the cursor.

Event Hub's Capture feature helps by allowing periodic export of events to Storage Blob service using Avro format.

Each Throughput Unit (TU) can handle up to 1MB/s or 1,000 msgs/s of ingress and 2MB/s or 2,000 msgs/s of egress, and TUs must be pre-allocated.

The Auto Inflation feature prevents message ingestion from ever being throttled, and the dedicated tier offers an extended event retention period.

Relay Costs

Relay Costs can be a bit tricky to understand, but don't worry, I'm here to break it down for you.

Credit: youtube.com, What is Azure Service Bus? (and why you might need it) | Azure Tutorial

Relay hours are calculated based on the time a relay is open, which starts when the first relay listener connects and ends when the last listener disconnects. This means that relay hours are billed for the cumulative amount of time during which each Service Bus relay is open.

Relay hours are charged at a rate of $0.10 for every 100 relay hours. For example, if you have a relay that's open for 200 hours, you'll be charged for 2 units of 100 relay hours, which is $0.20.

Relay messages are calculated using the same method as brokered entities, but with some notable differences. Sending a message to a relay is treated as a full-through send to the relay listener, resulting in two billable messages for a request-reply style service invocation.

Relays that use the netTCPRelay WCF binding treat messages as a stream of data, and Service Bus calculates billable messages based on the total amount of data sent or received on a 5-minute basis.

Relay pricing and connection quotas remain unchanged, and relays are charged based on the number of messages and relay hours. Here's a summary of the relay pricing:

As a rough guide, you can expect to pay approximately $1 for 100,000 messages.

Messaging Operations

Credit: youtube.com, 06. Apply operations on Azure Service Bus messages | Azure Service Bus

Azure Service Bus billing for messaging operations is changing to a per-operation model. This means you'll be billed for any API call made against a queue or topic/subscription service endpoint.

Management operations include creating, reading, updating, or deleting queues or topics/subscriptions. Messaging operations involve sending and receiving messages with queues or topics/subscriptions. Session state operations let you get or set session state on a queue or topic/subscription.

Each operation costs $0.05 per million operations, regardless of the plan you're on.

Messaging Operations

Messaging operations are a crucial aspect of Azure messaging services. They determine how you're charged for using these services.

With the new pricing model, billing for queues and topics/subscriptions is changing. They're transitioning from billing per message to billing per operation. An "operation" refers to any API call made against a queue or topic/subscription service endpoint.

Management operations include Create, Read, Update, and Delete (CRUD) against queues or topics/subscriptions. Messaging operations involve sending and receiving messages with queues or topics/subscriptions. Session state operations include getting or setting session state on a queue or topic/subscription.

A unique perspective: Azure Service Bus Queues

Credit: youtube.com, Operation Binder: Secrets of Inter-Process Communication

The cost of operations is broken down into three tiers: Basic, Standard, and Premium. The Basic tier charges $0.05 per million operations. The Standard tier has a base charge of $10/month, with the first 12.5 million operations included. It then charges $0.80 per million operations for 12.5-100 million operations, $0.50 per million operations for 100 million-2,500 million operations, and $0.20 per million operations for over 2,500 million operations.

The Premium tier has a fixed rate of $11.13 per Message Unit per day.

Brokered Connections

Brokered connections are a crucial aspect of messaging operations, and understanding how they work can help you optimize your messaging setup.

Brokered connections accommodate customer usage patterns that involve a large number of persistently connected senders/receivers against queues, topics/subscriptions, or Event Hubs.

In the Basic tier, there's a strict limit of 100 brokered connections per Service Bus namespace, and connections above this number will be rejected.

The Standard tier removes the per-namespace limit and counts aggregate brokered connection usage across the Azure subscription.

Credit: youtube.com, Brokered messaging in windows - Matt Milner

Brokered connections are billed on a graduated schedule in the Standard tier, with the first 1,000 connections included with the base charge.

Here's a breakdown of the costs for brokered connections in the Standard tier:

In the Premium tier, brokered connections are not charged, making it a good option for high-traffic messaging scenarios.

Cost Calculation

Relay hours are calculated based on the time a relay is open, which is considered from the moment the first relay listener connects to the Service Bus address until the last listener disconnects. This means that even if there are no messages being sent or received, the relay is still considered open and you'll be charged for the time it's open.

Relay hours are billed per hour, so if your relay is open for 3 hours, you'll be charged for 3 relay hours. The cost of relay hours is included in the overall cost of using Azure Service Bus.

Credit: youtube.com, Estimating Azure Costs with the Azure Pricing Calculator

Relays are treated as a "full through" send to the relay listener, which means that sending a message to a relay is considered a single billable message, rather than a send to the Service Bus relay followed by a delivery to the relay listener. This is different from using a queue to mediate between a client and a service.

For relays using the netTCPRelay binding, all data is treated as a stream for the purpose of calculating billable messages. Service Bus will calculate the total amount of data sent or received via each individual relay on a 5-minute basis and divide that total by 64 KB to determine the number of billable messages for the relay in question during that time period.

The cost of using Azure Service Bus is based on the number of messages processed, with a small amount charged for a very large number of messages. For example, you'll pay approximately $1 for 100,000 messages.

Here's a breakdown of the cost structure for Azure Service Bus:

The cost of operations varies depending on the plan you're on, with the Basic plan charging $0.05 per million operations, the Standard plan charging $0.80 per million operations for 12.5-100 million operations, and the Premium plan charging a daily fixed rate per Message Unit.

Walter Brekke

Lead Writer

Walter Brekke is a seasoned writer with a passion for creating informative and engaging content. With a strong background in technology, Walter has established himself as a go-to expert in the field of cloud storage and collaboration. His articles have been widely read and respected, providing valuable insights and solutions to readers.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.