Skip to content

Commit

Permalink
add quota.js, 100req/min limit
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidDurman committed Oct 15, 2024
1 parent 26b6ae3 commit f5b4b0f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/appmixer/zendesk/tickets/quota.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'use strict';

module.exports = {

rules: [
{
// https://developer.zendesk.com/api-reference/introduction/rate-limits/
// Note that we are applying a conversvative rate limit regardless of the user's plan.
// The rate limit below is based on the 100req/min limit imposed by the Update ticket endpoint.
// It's better to stay conversvative than letting the requests error out leading to a bad user experience.
limit: 100, // the quota is 100 per 60 seconds
window: 1000 * 60, // 60 seconds
throttling: 'window-sliding',
queueing: 'fifo',
resource: 'requests',
scope: 'userId'
}
]
};

0 comments on commit f5b4b0f

Please sign in to comment.