Hello,
i was parsing through the Quota policy document to understand the peak - off peak concept . based upon the below example. this relies on the information passed in query param to decide which limit should be added to the proxy.
My use case is : as an admin, i don’t want user to pass on any information related to the rate limit rather I want to give put rate limit as a restriction to save my system from abuse. hence i want to offer a better limit during daytime in a country by giving then 5 transactions per second limit. but during off business hours, i want to give only 1TPS limit to the user.
i want to understand how can i make the below policy smart enough to read system time, country code from the user’s custom attribute, and then after converting the time to local time - decide whether it is peak or non peak for that country.
<Allowcount="2000"countRef="verifyapikey.VerifyAPIKey.apiproduct.developer.quota.limit"/><Allow><Classref="request.queryparam.time_variable"><Allowclass="peak_time"count="5000"/><Allowclass="off_peak_time"count="1000"/></Class></Allow>