Most APIs require clients rate limit their calls - e.g. can make 100 times each 10 seconds. When writing code for a custom connector using an SDK there is generally a way respect these limits within the connector implementation, and so avoid having to place rate limit logic in multiple places throughout the business logic (the Recipe in Workato terminology).
A common low tech approach for single threaded integrations is to put a sleep(0.2 sec) before each API call. Not perfect, but often good enough. What is the recommended approach for achieving this within the Workato Connector SDK?
This approach requires all users of the connectors "self manage" retry etc ... logic within the recipe. That is a non goal here. Is this what happens with standard Workato connectors?
Best Answer
A
Alvin Ee
said
over 5 years ago
Our sincerest apologies for the delayed response. For this issue, the connector SDK does not support rate-limiting in the way that you have described. The reason behind this is because at the connector level, there is no way to determine how many calls have been made in a time period, and thus no way to limit that. That limit can only be implemented at recipe level. The same goes for standard Workato connectors, the only way to prevent exceeding rate limits would be to do it at the recipe level.
Answer
Alvin Ee
said
over 5 years ago
Our sincerest apologies for the delayed response. For this issue, the connector SDK does not support rate-limiting in the way that you have described. The reason behind this is because at the connector level, there is no way to determine how many calls have been made in a time period, and thus no way to limit that. That limit can only be implemented at recipe level. The same goes for standard Workato connectors, the only way to prevent exceeding rate limits would be to do it at the recipe level.
eLead
Connector SDK: Impliment Rate Limiting
Most APIs require clients rate limit their calls - e.g. can make 100 times each 10 seconds. When writing code for a custom connector using an SDK there is generally a way respect these limits within the connector implementation, and so avoid having to place rate limit logic in multiple places throughout the business logic (the Recipe in Workato terminology).
A common low tech approach for single threaded integrations is to put a sleep(0.2 sec) before each API call. Not perfect, but often good enough. What is the recommended approach for achieving this within the Workato Connector SDK?
I have read this article:
https://docs.workato.com/recipes/rate-limiting.html
This approach requires all users of the connectors "self manage" retry etc ... logic within the recipe. That is a non goal here. Is this what happens with standard Workato connectors?
Our sincerest apologies for the delayed response. For this issue, the connector SDK does not support rate-limiting in the way that you have described. The reason behind this is because at the connector level, there is no way to determine how many calls have been made in a time period, and thus no way to limit that. That limit can only be implemented at recipe level. The same goes for standard Workato connectors, the only way to prevent exceeding rate limits would be to do it at the recipe level.
Alvin Ee
Our sincerest apologies for the delayed response. For this issue, the connector SDK does not support rate-limiting in the way that you have described. The reason behind this is because at the connector level, there is no way to determine how many calls have been made in a time period, and thus no way to limit that. That limit can only be implemented at recipe level. The same goes for standard Workato connectors, the only way to prevent exceeding rate limits would be to do it at the recipe level.