<aside> 💡

Rate Limits runs as a GCP Cloud Run serverless deployment and stores data in GCP Firestore (cloud, NoSQL)

</aside>

This service supports the website, flow.driscoll.co and facilitates the creation of rate limits which can be used to determine if traffic to a target has any remaining capacity available.

Endpoints

Create

This endpoint allows the creation of a new rate limit. Here is an example payload

{"Name":"Standard Throughput", "Description": "Throttle for traffic to an endpoint", "UserId": "6160d1ea-ea51-4912-b447-334c9a10bfde", "TargetId": "076669bd-c5e3-4f36-9e49-97e84012f854", "HitsPerMinute": 6, "HitsPerHour": 180}

In this example, 6 hits are allowed per minute (360 per hour) and 180 per hour. So there can be a short term burstable rate but in a given 60 minute period the rate must be no more than 180 requests.

If any source of traffic exceeds these limits, it is deemed to have no capacity and the Flow Control service will indicate this when asked via the Has Capacity endpoint on the traffic service.

It is up to the service operator to respond to the advice that a traffic source has no remaining capacity. An http 429 - Too Many Requests status code is recommended.