Denial of Service for single API

Hello Everyone,

I have scenario where i need to apply rate limit (Denial of Service) on a single API in API-Gateway.
If i add Global Denial of Service it gets activated on all apis. But i need to add Denial of Service on a single API only.

Thanks

@mhaseeb.tariq Refer the traffic optimization option under the traffic monitoring policy

This policy limits the number of API invocations during a specified time interval, and sends alerts to a specified destination when the performance conditions are violated. You can use this policy to avoid overloading the back-end services and their infrastructure, to limit specific clients in terms of resource usage, and so on.

The Traffic Optimization policy generates two types of events when the specified limit is breached, policy violation event and monitor event. The policy violation event is for indicating the violations that occur for an API. If there are 100 violations, then 100 policy violation events are generated. The monitor event triggered by this policy is controlled by the alert frequency configuration specified in the policy.

Note : This is API specific policy i.e if there are n number of consumer accessing this API on violation all consumer will impacted [ consumer with less utilization will also gets affected ]

@DINESH_J
I guess this Policy only send alert upon exceeding no of invocations. But does not limits the invocation like we can achieve in Denial of Service. I Have added the screenshots, please check there is no option available to limit invocation, Like block the access to xyz-API for abc application for xxx time interval
image
image

@mhaseeb.tariq Refer your screen shot the rule name is Limit Configuration . This will limit the access to API if the Rules matches and it will deny the access to API with 429 response code and alert the consumer accordingly

I would suggest to refer the document and do the simple POC to see the behavior

2 Likes