Тёмный

System Design Rate Limiter | Sliding Window Implementation | System Design Interview 

The Tech Granth
Подписаться 20 тыс.
Просмотров 14 тыс.
50% 1

Sliding Window Rate limiter is another algorithm which we can use to implement rate limiting. It helps in protecting API from abuse. This is a continuation of previous video where I have explained token bucket rate limiting implementation
You can buy us a coffee at : www.buymeacoffee.com/thetechg...
system design: • System Design | Distri...
DS for beginners: • Arrays Data Structures...
leetcode solutions: • Leetcode 84 | Largest ...
github: github.com/TheTechGranth/theg...
facebook group : / 741317603336313
twitter: / granthtech

Наука

Опубликовано:

 

31 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 10   
@msingla135
@msingla135 4 месяца назад
I feel this is a better way of implementing the refresh method: private void refresh(long currTimeInSec) { long cutoffTime = currTimeInSec - windowInSecs; while(!window.isEmpty() && window.peek() < cutoffTime) window.poll(); }
@yournextdoortraveller
@yournextdoortraveller 2 года назад
Thanks for your video. One question. Do we actually need to calculate ''çalculatedTime' multiple time in while loop? Because the queue works on FIFO basis and if the top of the queue is expired for that sliding window isn't it the remaining entries of the queue also will be expired? Your thoughts please..
@devensingh5408
@devensingh5408 Год назад
as you already mentioned the queue works as FIFO so the top of the queue is the oldest so time diff also will be greater and could exceed the defined limit, but the same could not be the case for the latest ones
@mehulparmar9976
@mehulparmar9976 2 года назад
Employee class is not present while building the code
@mehulparmar9976
@mehulparmar9976 2 года назад
Can you also make a video on Sliding window with counters. Or atleast guide what will change in this code? Awesome video between.
@bhawanasahu3000
@bhawanasahu3000 6 месяцев назад
To implement sliding with counter you can use map instead of queue. That would solve the requirement.
@aneksingh4496
@aneksingh4496 2 года назад
Nice video
@TheTechGranth
@TheTechGranth 2 года назад
Hope it was helpful. Do like and subscribe and share with others 🙂
@hassaantahir3861
@hassaantahir3861 2 года назад
Bro BlaBlaCar system design ... Plz
@TheTechGranth
@TheTechGranth 2 года назад
Basic idea will be like ola or uber, on top of this architecture you can add more functionality. Do check out this video and let me know if you are expecting something more ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-AbvBcmABjcI.html
Далее
БИМ БАМ БУМ💥
00:14
Просмотров 3,2 млн
Good deed #standoff #meme
00:15
Просмотров 591 тыс.
Rate Limiting with Redis
26:46
Просмотров 31 тыс.
iPhone socket cleaning #Fixit
0:30
Просмотров 17 млн
АЙФОН Г0ВН0
0:54
Просмотров 1,5 млн