Digital Twin throughput

Domagoj Bazina 221 Reputation points
2023-01-13T14:13:54.43+00:00

Hello,
I'm wondering how "big" is the throughput of Digital Twin (DT) resource. So I've configured my DT resource to route all events to the Event Hub. So whenever DT instance gets created/updated this event will be routed to Event Hub endpoint. Also Angular Application subscribes to that Event hub and uses those events to update the UI.
Setup:
Something that updates DT ----> Digital Twin ----> Event Hub ----> Angular App
I'm using Basic tier for Event Hub NamespaceSetup.
Message consumption:

20-25 messages/second (1500 messages/minute)
When I've subscribed to that Event Hub in the Angular, I've noticed delay that occurs every 100 events. Something like this:
1, 2, 3, 4, ... 100. -> 3-5 second delay
101, 102, 103, 104, ... 200. -> 3-5 second delay

I've noticed that this delay occurs whenever number of events/seconds is higher than 10.

I thought that the problem lies within the Event Hub, but when I emitted the data to the Event hub (without DT in-between), it worked perfectly, without delay. So I've got feeling that DT creates some sort of batch for certain amount of events. Also I've found this page, about DT limitations.
Is there anything I can do so this delay disappears ? Maybe I'm not doing something right, but I m not aware of that.
Thanks in advance!

Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
219 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
556 questions
{count} votes

2 answers

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 13,456 Reputation points
    2023-01-16T20:11:57.9233333+00:00

    Hi @Domagoj Bazina thank for providing the requested information. As identified earlier, the Digital Twin API has a hard limit on the number of update operations it can perform per second which cannot be modified. Please find the below image for more information.

    User's image

    Note that the limit is not only applied to a single Digital Twin, but it includes any of its incoming/outgoing relationships.

    Relationships between Digital Twins can be classified as either:

    • Outgoing relationships: Relationships belonging to this twin that point outward to connect it to other twins. The GetRelationshipsAsync() method is used to get outgoing relationships of a twin.
    • Incoming relationships: Relationships belonging to other twins that point towards this twin to create an "incoming" link. The GetIncomingRelationshipsAsync() method is used to get incoming relationships of a twin.

    There's no restriction on the number of relationships that you can have between two twins—you can have as many relationships between twins as you like.

    Even though you are not making the 10 updates per second on a given Twin, you might still be hitting the limit as the Twins might be related. You can use the following SDK samples to get a list of relationships for a given Digital Twin.

    1. List outgoing relationships from a digital twin
    2. List incoming relationships to a digital twin

    Please note that this is a limit on the Digital Twin end but not the Event Hub. Hope this answers your questions. Please let me know if you need any further clarification or assistance on this.


    • Kindly mark the answer as useful if the response is helpful so that it would benefit other community members facing the same issue. 
    • Original posters help the community find answers faster by identifying the correct answer. Here is how 
    • I highly appreciate your contribution to the community. 
    0 comments No comments

  2. QuantumCache 20,031 Reputation points
    2023-03-10T00:58:24.0866667+00:00

    Hi,

    In-addition to the above discussion, below are few additional troubleshooting steps which may help us!

    The delay you are experiencing could be caused by a few different factors:

    1. Event Hub processing time: Even though the Basic tier of Event Hub should be able to handle your current message throughput, there could still be processing time involved before the messages are sent to the subscribers. This processing time could be causing the delay you are seeing.
    2. Network latency: Depending on the network setup between your Digital Twin and Event Hub, there could be network latency that is causing the delay.
    3. Subscriber processing time: If your Angular application is doing a lot of processing on each message received, that could be causing the delay as well.

    To diagnose the issue further, you could try the following:

    1. Monitor the processing time of the Event Hub to see if that is causing the delay. You can do this using Azure Monitor or other monitoring tools.
    2. Monitor the network latency between your Digital Twin and Event Hub to see if that is causing the delay. Again, Azure Monitor or other monitoring tools can help with this.
    3. Simplify the processing in your Angular application to see if that is causing the delay. You could try just logging the messages as they come in to see if that reduces the delay.

    Overall, with your current message throughput, the Basic tier of Event Hub should be able to handle the load without issue. But there could be other factors at play causing the delay.

    0 comments No comments