How are relay hours calculated?
Relay hours are billed for the cumulative amount of time during which each Service Bus Relay is "open". A relay is implicitly instantiated and opened at a given Service Bus address (service namespace URL) when a relay-enabled WCF service, or "relay listener," first connects to that address. It's closed only when the last listener disconnects from its address. Therefore, for billing purposes a relay is considered "open" from the time the first relay listener connects, to the time the last relay listener disconnects from the Service Bus address of that relay.
Related questions and answers
The premium tier of Service Bus messaging is a flat daily rate per messaging unit purchased. Namespaces created as premium can have 1, 2, or 4 messaging units which will each accrue the given number of messaging unit daily rate charges. Premium namespaces can have the number of purchased messaging units changed at any time, but the daily rate is based on the maximum number of message units assigned to the namespace at any time.
A brokered connection is defined as one of the following:
- An AMQP connection from a client into a Service Bus topic, subscription, queue, or event hub.
- An HTTP call to receive a message from a Service Bus topic or queue that has a receive timeout value greater than zero.
Microsoft charges for the peak number of concurrent brokered connections that exceed the included quantity (1,000 in the standard and premium tier). Peaks are measured on an hourly basis, prorated by dividing by 730 hours in a month, and added up over the monthly billing period. The included quantity (1,000 brokered connections per month) is applied at the end of the billing period against the sum of the prorated hourly peaks.
- 5,000 clients connect via a single AMQP connection each, and receive commands from a Service Bus topic and send events to queues. If all clients connect for 12 hours every day, you will see the following connection charges (in addition to any other Service Bus charges)—5,000 connections * 12 hours * 30.5 days / 730 = 2,500 brokered connections. After the monthly allowance of 1,000 brokered connections, you would be charged for 1,500 brokered connections.
- 5,000 clients receive messages from a Service Bus queue via HTTP, specifying a non-zero timeout. If all devices connect for 12 hours every day, you will see the following connection charges (in addition to any other Service Bus charges)—5,000 HTTP receive connections * 12 hours per day * 30.5 days / 730 hours = 2,500 brokered connections.
The premium tier of Service Bus messaging provides all the messaging features of Azure Service Bus queues and topics with predictable, repeatable performance, higher throughput, and improved availability. The premium tier uses a dedicated resource allocation model to provide workload isolation and consistent performance. Because the compute and memory resources in the premium tier are dedicated, there are no per-message transaction charges as in other tiers. All transactions are included in the message unit allocation.
Yes, they do. There are no connection charges for sending events using HTTP, regardless of the number of sending systems or devices. Receiving events with HTTP using a timeout greater than zero, sometimes called "long polling," generate brokered connection charges. AMQP connections generate brokered connection charges regardless of whether the connections are being used to send or receive. Note that 100 brokered connections are allowed at no charge in a basic namespace (this is also the maximum number of brokered connections allowed for the Azure subscription). The first 1,000 brokered connections across any and all standard namespaces in an Azure subscription are included at no extra charge (beyond the base charge). Since these allowances are enough to cover many service-to-service messaging scenarios, brokered connection charges usually only become relevant if you plan to use AMQP or HTTP long-polling with a large number of clients, for example, to achieve more efficient event streaming, or enable bi-directional communication with thousands or millions of devices or app instances.
A messaging unit is a set of dedicated resources exclusively reserved for premium namespaces. This resource set can deliver a consistent and repeatable performance of messaging workloads. Each premium namespace can have 1, 2, or 4 messaging units and the resource allocation grows linearly—2 messaging units will consist of twice as many resources allocated as 1 messaging unit.
We will charge 64 KB for each connection to your listener. This will be deducted from the 5 GB free we offer each month with listener units. The listener unit charge is calculated per hour in increments of 5 minutes. You will not be charged for multiple opens and closes for dev/test purposes.