1. 16 Apr, 2025 2 commits
    • Refactor: Optimize the token bucket algorithm, specifically the New method in… · e121e772
      Refactor: Optimize the token bucket algorithm, specifically the New method in common/imiterlimiter.go.
      Solution: Remove Redis ping. When printing exceptions, use SysLog to print and add additional logging information.
      霍雨佳 committed
    • Refactor: Optimize the request rate limiting for ModelRequestRateLimitCount. · 5aa2076e
      Reason: The original steps 1 and 3 in the redisRateLimitHandler method were not atomic, leading to poor precision under high concurrent requests. For example, with a rate limit set to 60, sending 200 concurrent requests would result in none being blocked, whereas theoretically around 140 should be intercepted.
      Solution: I chose not to merge steps 1 and 3 into a single Lua script because a single atomic operation involving read, write, and delete operations could suffer from performance issues under high concurrency. Instead, I implemented a token bucket algorithm to optimize this, reducing the atomic operation to just read and write steps while significantly decreasing the memory footprint.
      霍雨佳 committed
  2. 14 Apr, 2025 5 commits
  3. 13 Apr, 2025 1 commit
  4. 12 Apr, 2025 1 commit
  5. 11 Apr, 2025 6 commits
  6. 10 Apr, 2025 11 commits
  7. 09 Apr, 2025 4 commits
  8. 08 Apr, 2025 7 commits
  9. 07 Apr, 2025 2 commits
  10. 06 Apr, 2025 1 commit