Rate Limiter: Rust Interview with a Google Engineer

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 4

  • @deathbombs
    @deathbombs 7 месяцев назад

    I've done lots of coding questions and still learned from this, well done! This guy knows his monotonic stacks as well which is rare

  • @JaydeepMaddipati
    @JaydeepMaddipati 3 месяца назад

    One way of implementing global limit for is allowed is to use a counting semaphore with value m.then inside is allowed function try acquiring it a timeout that is acceptable..if yes then continue else handle the timeout and return false..also release the semaphore just before returning true..

  • @chrisjbellew
    @chrisjbellew 7 месяцев назад

    I would have said token bucket for global admission control. By global i mean all requests on the server. Anyone think of a better approach?

    • @deathbombs
      @deathbombs 7 месяцев назад

      I feel like this is more for a distributed system, where there's threads and one adds to a bucket while another removes. I think the simple approach here is easier to code and better in interview environment