Azure Event Hubs: Auto-Inflate (Middleware Friday)

|  Posted: June 19, 2017  |  Categories: Event Hubs

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.

Azure Event Hubs: Auto-Inflate Azure Event Hubs: Auto-InflateEnable 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 download the ARM Template to create an Event Hubs namespace and enable auto-inflate from Github.

You can watch the video of this session here –

 

Feedback Survey

If you have any specific topics of interest at Middleware Friday, you can fill in this survey. Alternatively, you can tweet at @MiddlewareFri or drop an email to middlewarefriday@gmail.com with your topics of preference.

You can watch the Middleware Friday sessions here.

Author: Sriram Hariharan

Sriram Hariharan is the Senior Technical and Content Writer at BizTalk360. He has over 9 years of experience working as documentation specialist for different products and domains. Writing is his passion and he believes in the following quote - “As wings are for an aircraft, a technical document is for a product — be it a product document, user guide, or release notes”.

One Platform Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

ServiceBus360

Azure Composite Applications

Learn more

Start managing your Azure services in minutes

One Platform - Operations, Monitoring and Analytics Software
BizTalk360

microsoft biztalk

Learn more

Over 500 customers across 30+ countries depend on BizTalk360

One Platform - Operations, Monitoring and Analytics Software
ServiceBus360

Azure Composite Applications

Learn more

Start managing your Azure services in minutes