You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "dpgaspar (via GitHub)" <gi...@apache.org> on 2023/06/16 11:48:14 UTC

[GitHub] [superset] dpgaspar commented on a diff in pull request #24324: chore: rate limit requests

dpgaspar commented on code in PR #24324:
URL: https://github.com/apache/superset/pull/24324#discussion_r1232143521


##########
superset/config.py:
##########
@@ -264,6 +264,12 @@ def _try_json_readsha(filepath: str, length: int) -> str | None:
 # Configuration for scheduling queries from SQL Lab.
 SCHEDULED_QUERIES: dict[str, Any] = {}
 
+# Rate limiting
+RATELIMIT_ENABLED = True
+AUTH_RATE_LIMITED = True
+AUTH_RATE_LIMIT = "2 per 5 second"
+RATELIMIT_APPLICATION = "50 per second"

Review Comment:
   Airflow implemented the same, their using `auth_rate_limit = 5 per 40 second`. Not sure about rate limiting the entire application this way, rate limits are better when tied to a user and state is set globally, this is possible with [flask-limiter](https://flask-limiter.readthedocs.io/en/stable/) (what FAB is using for this) but needs further configuration.
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org