airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
15.53k stars 4k forks source link

Concurrent CDK: Rate limit #29628

Closed girarda closed 10 months ago

girarda commented 1 year ago

What

It should be possible for a source connector to define a credit-based rate limit to avoid busting the API's limit

A simple implementation is to define a limit of N requests for a given time window, and keep a count of the number of request sent during the current window.

Note:

Testing

Acceptance criteria

girarda commented 1 year ago

Noting that this feature can be useful in other contexts (eg for vector db destination). If possible, we should implement the rate limiter such that it can be reused outside of the a "concurrent CDK" source

girarda commented 1 year ago

Grooming notes:

lucasfcnunes commented 12 months ago

I can say that https://docs.airbyte.com/integrations/sources/clickup-api/ could use this and benefit people with the following plans https://clickup.com/api/developer-portal/rate-limits/#:~:text=The%20rate%20limit%20varies%20based,requests%20per%20minute%20per%20token.

Free Forever, Unlimited, and Business Plan: 100 requests per minute per token.

Surely, other APIs have those "plan limits" and I do think it's good practice to limit requests to 3rd party APIs to prevent being confused with a bad bot/IP blocking.