question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] EventHub Throttle and TU relationship / Latency details / Partition and TU relationship

See original GitHub issue

Query/Question

I’ve multiple queries:

  • 1 TU is 1 MB / sec or 1000 msgs / sec (I read it somewhere written as 1000 API calls / sec) whichever happens first. Imagine I’ve message of size 500 bytes, then I would be able to create an EventDataBatch containing ~2000 msgs (less than 2000 but close to it) and I would be able to send it to EventHub with 1 send call eventProducerClient.send(eventDataBatch). In this case, the size of eventDataBatch will be ~ 1MB (less than 1 MB but close to it) and I am making 1 API call (but sending ~2000 msgs in that call). Will my request be throttled?

    Or put in another way, If I know that my per message size is < 1 KB, should I still limit the eventDataBatch to only 1000 messages (and utilizing only half of 1MB / sec)?

    And if the requests are being throttled, how is the application supposed to know about this? There is only a WARNING log. I raised the relevant BUG here: https://github.com/Azure/azure-sdk-for-java/issues/11003

  • Is there a way to know the time EventHub SDK takes to push my Event (or EventDataBatch) to EventHub? I currently have no latency information from SDK. I am calculating it in my own code right now like this:

      try (com.codahale.metrics.Timer.Context ignored = latency.time()) { // dependency io.dropwizard.metrics:metrics-graphite:4.1.7
          eventHubProducerClient.send(eventDataBatch);
      }
    

    Is this how this is supposed to be done? Also, what is the expected latency while pushing data (one Event / EventDataBatch) to EH?

  • I am trying out EventHub SDK Consumer and Producer in a sample application where I consumer from an EventHub A (having 32 partitions, loads of data available, reading from EventPosition.earliest() and not storing checkpoints) and pushing the messages unmodified to another EventHub B having 5 partitions. Since each partition can only be maxed out with 1 TU, it should be pointless to have more than 5 TU on EventHub B. However, if I enable Auto-Inflate (with max TU allowed at 20) and keep my Consumer and Producer running, it inflates my EventHub to 20 TU and I can see significant gain in performance (more than double than keeping TU at 5).

    I am not able to understand this because no partition can utilize the 15 extra TU that are being allocated by Auto-Inflate feature. Just to point it out EventHub B is the only EventHub in that namespace. So the producer EventHub namespace overall only has 5 partitions.

Why is this not a Bug or a feature Request? I couldn’t categorize it as bug / feature request because I might be missing a few details in my understanding.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Query Added
  • Setup information Added

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:21 (20 by maintainers)

github_iconTop GitHub Comments

1reaction
serkantkaracacommented, Sep 1, 2020

@shubhambhattar, so we are good to close this issue and track the new issue only?

1reaction
serkantkaracacommented, Sep 1, 2020

@shubhambhattar, thanks for providing new test data. Can you send me your test namespace so I can check service side metrics and failures? You can reach me from serkar@microsoft.com

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently asked questions - Azure Event Hubs
This article provides a list of frequently asked questions (FAQ) for Azure Event Hubs and their answers.
Read more >
Azure Functions and Event Hubs: Optimising for Throughput
I'd call this 'expected behaviour': the pipeline's latency (top chart) is in the hundreds of seconds in the beginning, as the Azure Function...
Read more >
Best Practices and Architectures for Real Time Data
Throttling – With Azure Event Hub, you purchase capacity in terms of TU (Throughput Unit) – where 1 TU entitles you to ingest...
Read more >
Azure Function with Event Hub trigger receives weird amount ...
When you send events to hub check that all events are sent with the same partition key if you want try batch processing...
Read more >
Azure Event Hub – Understanding & Designing of Partitions ...
Throughput units (TU): Pre-purchased units of capacity. Event hub has Ingress and egress capacity measured by throughput unit.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found