exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 3 question 14 discussion

Actual exam question from Microsoft's AZ-204
Question #: 14
Topic #: 3
[All AZ-204 Questions]

HOTSPOT -
You are building a traffic monitoring system that monitors traffic along six highways. The system produces time series analysis-based reports for each highway.
Data from traffic sensors are stored in Azure Event Hub.
Traffic data is consumed by four departments. Each department has an Azure Web App that displays the time series-based reports and contains a WebJob that processes the incoming data from Event Hub. All Web Apps run on App Service Plans with three instances.
Data throughput must be maximized. Latency must be minimized.
You need to implement the Azure Event Hub.
Which settings should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: 6 -
The number of partitions is specified at creation and must be between 2 and 32.
There are 6 highways.

Box 2: Highway -
Reference:
https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dantest
Highly Voted 4 years, 3 months ago
Partitions relate to producers - and the logical way to partition the incoming data is by the only value you have at that point, the highway name/id. So the selected answer is correct (6 Partitions, by Highway). People are getting confused by the departments which would actually each be an event consumer with an associated Consumer Group which would have it's own isolated view of each of the highway partitions.
upvoted 139 times
MiraA
3 years, 5 months ago
One thought... The assignment mentions "Partition Key" (not "Partition Id"). "Producers can provide a value for the event key. When they do, a hashing-based partitioner determines a hash value from the key. The event then goes to the partition associated with that hash value." https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/event-hubs/partitioning-in-event-hubs-and-kafka#distribute-events-to-partitions So it is possible for 2 or more highways to be - by a chance - hashed to a single partition leaving 1 or more partitions idle at all. If really unlucky then all 6 highways would be hashed to one partition. The very same situation is with Highway, Department and VM name used as the "Partition Key" as they are discrete values (6 highways, 4 departments, N virtual machines). The Timestamp could do a better job - but "spraying" data from one highway across all partitions... The best job could do "Partition Id". "Producers can specify a partition ID with an event. The event then goes to the partition with that ID." So each highway could get hardcoded its own partition preserving order of the data.
upvoted 2 times
PhilLI
3 years, 3 months ago
I guess you're right, although losing maximum availability.
upvoted 1 times
...
...
Dani_ac7
2 years, 6 months ago
If we have 4 groups of consumers and each consumer group, according to the theory, reads independently and isolated from the rest, highways and 6 partitions makes a lot of sense
upvoted 2 times
...
Robert12345Robert
3 years, 8 months ago
https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-faq The number of partitions in an event hub directly relates to the number of concurrent readers you expect to have
upvoted 9 times
PhilLI
3 years, 3 months ago
If you read the features page you'll understand that this is not the simple answer to the question. https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features Event receivers organised in consumer groups read all partitions. Via a leasing mechanism the receiver within a consumer group can make sure they don't read duplicate data. Partitions are more related to Event producers (can be 1-on-1)
upvoted 2 times
...
...
minaritochuck
3 years ago
it's a best practice for publishers(producers) to remain unaware of the specific partitioning model chosen for an event hub and to only specify a partition key that is used to consistently assign related events to the same partition.
upvoted 2 times
minaritochuck
3 years ago
oh nevermind, I guess it would be most effective when partitions num matches the producers num.
upvoted 1 times
...
...
...
sasisang
Highly Voted 4 years, 3 months ago
The answer should be 4 and Highway. Exam Topics - Please provide correct answers. What is the use of buying questions on your site...if you are not sure of the answer yourself
upvoted 43 times
kwaazaar
3 years, 11 months ago
But theres 6 highways, so why not 6 partitions?
upvoted 2 times
clarionprogrammer
3 years, 11 months ago
There are 4 consumers. Partitions are a data organization mechanism that relates to the downstream parallelism required in consuming applications. The number of partitions in an event hub directly relates to the number of concurrent readers you expect to have. https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-faq
upvoted 2 times
guardna
3 years, 10 months ago
But each department has 3 instances of the Web App/Job. So isn't there 12 consumers?
upvoted 7 times
...
warchoon
2 years ago
"The event publisher is only aware of its partition key, not the partition to which the events are published. This decoupling of key and partition insulates the sender from needing to know too much about the downstream processing. A per-device or user unique identity makes a good partition key, but other attributes such as geography can also be used to group related events into a single partition. Specifying a partition key enables keeping related events together in the same partition and in the exact order in which they arrived. The partition key is some string that is derived from your application context and identifies the interrelationship of the events. A sequence of events identified by a partition key is a stream. A partition is a multiplexed log store for many such streams."
upvoted 1 times
...
...
...
jessicazheng
3 years, 1 month ago
https://www.linkedin.com/pulse/azure-event-hub-understanding-designing-partitions-unit-kamal-pathak
upvoted 1 times
...
BrettusMaximus
3 years, 10 months ago
There are 6 highways and 6 reports. Each department only needs to read one partition to produce their report on that one highway. If you had 4 partitions you would have to duplicate all the data 4 times (BAD) and then each department would need to read all the data and filter the data for one report (VERY BAD).
upvoted 11 times
BrettusMaximus
3 years, 10 months ago
When you create the Hub it does not know either the Departments or the VMs
upvoted 3 times
...
...
...
8c64e49
Most Recent 2 days, 2 hours ago
Number of Partitions (6): Each partition in an Azure Event Hub operates as an independent channel for processing data. By matching the number of partitions to your six highways, each highway's data is routed to its own dedicated partition. This parallelization ensures that data streams for different highways do not interfere with each other, maximizing throughput and reducing latency. Partition Key ("Highway"): The partition key determines how data is distributed across partitions. By using "Highway" as the key, all data related to a specific highway is consistently routed to the same partition. This organization is critical for scenarios requiring ordered processing of data, like traffic pattern analysis or highway-specific monitoring. If you were to use fewer partitions, multiple highways might share a partition, potentially creating bottlenecks. Conversely, more partitions than highways would be inefficient, as some partitions would remain underutilized.
upvoted 1 times
...
wafa_chaari
1 month, 2 weeks ago
6 and highway, departments are consumer groups. (NB: you can use up to 5 consumers per partition where all receivers get all the events of the partition)
upvoted 1 times
...
cmmr
3 months, 4 weeks ago
After spending a lot of time here, I'm going with a different answer: - 3 - Highway Although there are 4 departments, each department is part of a different consumer group, consuming messages in parallel. Each consumer group has 3 consumers, which will be assigned partitions. According to MS: "We recommend that there's only one active receiver on a partition within a consumer group. However, in certain scenarios, you can use up to five consumers or receivers per partition where all receivers get all the events of the partition. If you have multiple readers on the same partition, then you process duplicate events. You need to handle it in your code, which isn't trivial. However, it's a valid approach in some scenarios." Link: https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-features#partitions
upvoted 1 times
...
Vichu_1607
4 months, 1 week ago
Recommended Settings: Number of Partitions: 12 Partition Key: Highway identifier (e.g., highway_id) Number of Partitions: The number of partitions should be chosen based on the expected throughput and the number of concurrent consumers. Since you have four departments, each with a WebJob processing the data, and each WebJob runs on three instances, you have a total of 4 * 3 = 12 consumers.
upvoted 2 times
...
Mattt
4 months, 3 weeks ago
I gave the whole discussions to ChatGPT and here is the summery: The final answer, based on the consensus and reasoning in the discussion, appears to be: Number of partitions: 6 Partition key: Highway The rationale is that since there are 6 highways, partitioning by highway ensures that events related to each highway are processed in order and kept separate. This structure supports scalability and ordered event processing, which is essential for time series analysis in the system.
upvoted 1 times
...
Christian_garcia_martin
7 months, 3 weeks ago
copilot : 6 and Highway
upvoted 2 times
...
Hendrikdb
1 year ago
If your partition key is highway, no way your number can be 12. Only when your partition key is department, you can put 12 instances. Even chatgpt and bard are proposing both aproaches but propose scailing it to the consumer side. After long consideration, I sitl think highway and 6 instances is correct.
upvoted 1 times
...
11_NickName_11
1 year, 3 months ago
When a client application sends events to an event hub without specifying a partition, events are automatically distributed among partitions in your event hub. If a partition isn't available for some reason, events are distributed among the remaining partitions. This behavior allows for the greatest amount of up time. For use cases that require the maximum up time, this model is preferred instead of sending events to a specific partition. So maybe 12 & VM? https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-availability-and-consistency?tabs=dotnet#availability
upvoted 1 times
...
AlbertoBT
1 year, 4 months ago
Partition key: Highway (Partitions relate to producers) You should not base your data on the architecture this is not scalable Partitions: (Hub partitions not data partition this last are implicit by the Highway Partition key) 12 Partitioning allows for multiple parallel logs to be used for the same event hub and therefore multiplying the available raw IO throughput capacity. https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-features#advantages-of-using-partitions Mapping of events to partitions The event publisher is only aware of its partition key, not the partition to which the events are published. This decoupling of key and partition insulates the sender from needing to know too much about the downstream processing. A per-device or user unique identity makes a good partition key... https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-features#number-of-partitions Then in each VM the webjob can split the processes in batches using the Highway to speed up the query.
upvoted 1 times
...
adilkhan
1 year, 11 months ago
6 and highway chatGPT
upvoted 1 times
macobuzi
1 year, 6 months ago
Lol , i asked ChatGPT and it said 12. 4 departments * 3 instances = 12 partitionkey needed
upvoted 1 times
...
...
RealRaymond
2 years, 1 month ago
12 (4*3) physical partitions; timestamp as partition key
upvoted 1 times
...
dimsok
2 years, 1 month ago
The number of partitions to use in Azure Event Hub depends on the desired level of parallelism and the expected ingress rate. For maximum data throughput, you would want to use as many partitions as possible. Each partition allows for a separate stream of events to be processed in parallel, increasing the ingress rate. On the other hand, having too many partitions can lead to increased latency, as the events must be divided among the partitions Answer is 12. The partition key is a value that determines which partition an event should be sent to. The events with the same partition key are guaranteed to be ordered and processed by the same partition. In a traffic monitoring system, the partition key could be related to the highway being monitored. Answer is highway.
upvoted 1 times
...
michaelfastov
2 years, 3 months ago
https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-features "Your own applications must be able to keep up with processing the volume of events that are being sent into an event hub" In our case events are highway reports (6). 4 applications are consumers. 6 is correct.
upvoted 1 times
...
OPT_001122
2 years, 3 months ago
selected answer is correct
upvoted 1 times
...
Alluru
2 years, 5 months ago
Number of partitions – 6 – selected because there are 6 highways. Partition Key – Highway – map the incoming events into specific partition. Partition-Key is sender supplied value passed into event-hub. https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-features#partitions
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago