Try for free Book a demo

Azure Event Hubs: Auto-Inflate (Middleware Friday)

Events

3 Mins Read | Last modified on February 28th, 2024

Azure-Event-Hub

In this blog, I will take you through one of the recently released features in Azure Event Hubs: Auto-Inflate. This topic was recently covered by Kent Weare in Episode 24 of Middleware Friday.

What is Azure Event Hubs: Auto-Inflate?

Azure Event Hubs is a highly scalable telemetry ingestion service which can ingest millions of events per second. Azure Event Hubs enables you to ingress a large amount of telemetry information into the cloud and read data from multiple applications using publish-subscribe mechanism.

One of the advantages offered by the cloud is “building for peak”. Say, you are a Power/Energy company, it’s crucial that you build your infrastructure to be able to deliver the maximum throughput that is demanded by the consumers. To achieve this, it involves cost as the utilization may not be at the peak (maximum) at all times. With cloud technology, this becomes simple with the help of concepts like auto-scaling etc., where you can ingest the right amount of infrastructure to meet the demand and later intelligently scale down the services. This is where the Event Hubs offering of Microsoft plays a key role through its partition and consumer group offerings.

Throughput Units (TU)

Azure Event Hubs lets you scale up/down with Throughput Units (TUs) which is the throughput capacity of the Azure Event Hubs.

A single throughput unit includes –

  • Ingress: Up to 1 MB per second or 1000 events per second (whichever happens first)
  • Egress: Up to 2 MB per second

These values of TU is sufficient when there is a predictable usage in your infrastructure. However, when the situation arises to have more data transfer through the Event Hubs, customers normally increase the number of TUs manually. This process can now be automated using the Azure Event Hubs: Auto-Inflate functionality.

Auto-Inflate enables users to automatically scale-up your TUs to meet the demands. With auto-inflate in place, users can prevent throttling when the ingress rates exceed the pre-determined TUs and when egress rates exceed your set TUs.

Azure Event Hubs: Auto-inflate is a very cost-effective value-added functionality offered by Microsoft that gives more control based on the usage and demands without any changes to the existing setup.

How Auto-Inflate Works?

You can enable or disable Auto-Inflate on a particular namespace using the Azure Portal or through the Azure Resource Manager (ARM) Template.

Enabling Auto-Inflate on the Azure Portal

You can either enable auto-inflate when you create the Event Hub or from the “Scale” option on the left blade menu. The below screenshots depicts the ways in which you can enable Auto-Inflate in the Azure Portal.


EHwithAutoInflate-PostCreationEnable Auto-Inflate using Azure Resource Manager template

If you are using the Azure Resource Manager (ARM) template to create and deploy the Event Hubs in Azure, you can modify the code in the ARM template to enable the Auto-Inflate feature. All you have to do is set the “isAutoInflateEnabled” property to “True” and set the value of “maximumThroughputUnits” to your preferred value (say, 5).


"resources": [
    {
      "apiVersion": "2017-04-01",
      "name": "[parameters('namespaceName')]",
      "type": "Microsoft.EventHub/Namespaces",
      "location": "[resourceGroup().location]",
      "sku": {
        "name": "Standard",
        "tier": "Standard"
      },
      "properties": {
        "isAutoInflateEnabled": true,
        "maximumThroughputUnits": 10
      },
      "resources": [
        {
          "apiVersion": "2017-04-01",
          "name": "[parameters('eventHubName')]",
          "type": "EventHubs",
          "dependsOn": [
            "[concat('Microsoft.EventHub/namespaces/', parameters('namespaceName'))]"
          ],
          "properties": {
            "messageRetentionInDays": "7",
            "partitionCount": "4"
          },
          "resources": [
            {
              "apiVersion": "2017-04-01",
              "name": "[parameters('consumerGroupName')]",
              "type": "ConsumerGroups",
              "dependsOn": [
                "[parameters('eventHubName')]"
              ],
              "properties": {
                "userMetadata": "This is a Test Metadata"
              }
            }
          ]
        }
      ]
    }
  ],

You can watch the video of this session here.

This article was originally published on Jun 19, 2017. It was most recently updated on Feb 28, 2024.

Related Articles