Lilypad-Tech / lilypad

Run AI workloads easily in a decentralized GPU network. https://www.youtube.com/watch?v=yQnB2Yxia4Y
https://lilypad.tech
Apache License 2.0
52 stars 16 forks source link

Add solver HTTP rate limiting #417

Closed bgins closed 2 weeks ago

bgins commented 3 weeks ago

We have noticed the solver may receive unbounded requests from job creators or resource providers. Let's add a rate limiter to limit traffic to an acceptable threshold.

We can start with a simple policy to set a limit by IP address and route. For example we could use go-chi/httprate: https://github.com/go-chi/httprate#rate-limit-by-ip-and-url-path-aka-endpoint.

walkerlj0 commented 2 weeks ago

@kelindi to review @bgins PR for adding rate limiting