Skip to content

Latest commit

 

History

History

RequestsThrottling

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

RequestsThrottling

This ejercicio is from WorkForFood.


Propose solution how we can restrict the number of requests for our web APIs.


Technology stack

  • C#
  • .NET 6.0

Implementation description

Yes, there is [RateLimiting]https://learn.microsoft.com/en-us/aspnet/core/performance/rate-limit?view=aspnetcore-8.0 But as for it should be custom and .net 6.0 base idea comes from here and there Integration Tests from here and there so...

Application 1 - API

with RequestThrottlingMiddleware

  • limits the number of requests handled in parallel
  • use queue for processing boost
  • queue is limited by length and has item timeout

Application 2 - Integration Tests

How To Run It

Just run tests

Tags

.net core c# asp.net core web api minimal api xUnit integration test mvc testing webapplicationfactory testhost middleware limited concurrent queue slim semaphore interlocked

Go Ahead