exam questions

Exam PL-400 All Questions

View all questions & answers for the PL-400 exam

Exam PL-400 topic 17 question 2 discussion

Actual exam question from Microsoft's PL-400
Question #: 2
Topic #: 17
[All PL-400 Questions]

You need to reduce the number of Azure consumption API calls for User2.
Which markup segment should you use?
A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: C
Scenario: User2 reports that Azure consumption for API calls has increased significantly to 100 calls per minute in the last month.
Example:
In the following example, the rate limit of 10 calls per 60 seconds is keyed by the caller IP address. After each policy execution, the remaining calls allowed in the time period are stored in the variable remainingCallsPerIP.
<policies>
<inbound>
<base />
<rate-limit-by-key calls="10"
renewal-period="60"
increment-condition="@(context.Response.StatusCode == 200)"
counter-key="@(context.Request.IpAddress)"
remaining-calls-variable-name="remainingCallsPerIP"/>
</inbound>
<outbound>
<base />
</outbound>
</policies>
Note: The rate-limit-by-key policy prevents API usage spikes on a per key basis by limiting the call rate to a specified number per a specified time period. The key can have an arbitrary string value and is typically provided using a policy expression. Optional increment condition can be added to specify which requests should be counted towards the limit. When this call rate is exceeded, the caller receives a 429 Too Many Requests response status code.
Incorrect Answers:
A: With renewal-period="30" 200 calls/minute would be allowed.
B: This would increase the calls/minute limit to 1000.
Reference:
https://docs.microsoft.com/en-us/azure/api-management/api-management-access-restriction-policies

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
Juan0414
2 months ago
The only one under 100 is C. So I guess it is that one: "User2 reports that Azure consumption for API calls has increased significantly to 100 calls per minute in the last month." C.
upvoted 1 times
...
hai297
7 months, 1 week ago
Hi, I just summarize as A: 200 calls/min B: ~666 calls/min C: 1 call/min D 200 calls mins => C is correct. Am I right?
upvoted 3 times
...
Juan86
1 year, 2 months ago
I still dont get why is C. Any idea? For me A makes mroe sense since we stablish a limit in 100.
upvoted 1 times
RavinBrissy
3 months ago
I think the given answers missing some lines. Refer to the explanation given
upvoted 1 times
...
Asmiin
1 year, 1 month ago
I guess C because in scenario we can see that User2 already complain that his calls number already is around 100.
upvoted 4 times
...
smwadi
1 year ago
Renewal Period is 30 and as per description it is in seconds so with that logic it will go upto 200 calls / min.
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