Skip to content

Commit

Permalink
feat(rate_limit): increase user request limit from 60 to 120 per minu…
Browse files Browse the repository at this point in the history
…te (#3903)
  • Loading branch information
Sma1lboy authored Feb 26, 2025
1 parent 520fb54 commit bb60b11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ee/tabby-webserver/src/rate_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ pub struct UserRateLimiter {
rate_limiters: Mutex<TimedCache<String, ratelimit::Ratelimiter>>,
}

static USER_REQUEST_LIMIT_PER_MINUTE: u64 = 60;
static USER_REQUEST_LIMIT_PER_MINUTE: u64 = 120;

impl Default for UserRateLimiter {
fn default() -> Self {
Self {
// User rate limiter is hardcoded to 30 requests per minute, thus the timespan is 60 seconds.
// User rate limiter is hardcoded to 120 requests per minute, thus the timespan is 60 seconds.
rate_limiters: Mutex::new(TimedCache::with_lifespan(60)),
}
}
Expand Down

0 comments on commit bb60b11

Please sign in to comment.