Rate Limiting Minimal APIs and Controllers the Right Way
Автор: Milan Jovanović
Загружено: 2025-08-08
Просмотров: 11030
Join a community of 5000+ .NET developers: / milanjovanovic
Want to master Clean Architecture? Go here: https://bit.ly/3PupkOJ
Want to unlock Modular Monoliths? Go here: https://bit.ly/3SXlzSt
Most tutorials show you how to apply global rate limits — but that’s rarely what you want in a real-world app. In this video, I’ll show you how to rate limit individual users using RateLimitPartition in .NET 8.
We’ll cover:
✅ Applying rate limits in minimal APIs and controllers
✅ Using JWT claims to identify users
✅ Fixed window vs token bucket algorithms
✅ Customizing rejected responses (e.g. Retry-After header, problem details)
✅ Using dotnet user-jwts for local testing
Whether you're building APIs for internal use or public consumption, this gives you much more control and flexibility.
🧠 Full source code available to my Patreon supporters: / milanjovanovic
Check out my courses:
https://www.milanjovanovic.tech/courses
Read my Blog here:
https://www.milanjovanovic.tech/blog
Join my weekly .NET newsletter:
https://www.milanjovanovic.tech
Chapters
0:00 Configuring Rate Limiting
3:33 Defining Rate Limit Partitions
7:01 Getting a JWT (dotnet user-jwts)
9:26 Returning Problem Details (429 Too Many Requests)
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: