Layr-Labs / eigenda-proxy

Secure and optimized communication layer for rollups using EigenDA.
MIT License
15 stars 22 forks source link

Feature: support rate limits #102

Closed samlaf closed 3 weeks ago

samlaf commented 2 months ago

Creating this issue to discuss where is the best place to handle rate limits and backpressure in general.

With new op-batcher that supports concurrent dispersal requests (see https://github.com/Layr-Labs/optimism-exp/pull/3), we need to start considering how to make sure not to go over the disperser rate-limits if multiple blob requests are being sent in parallel.

We could add a rate limiter in the op-batcher code, but wondering if it wouldn't be best to add the rate limiter as part of the eigenda-proxy middleware. Probably could allow a buffer of requests to wait before dropping requests to put backpressure.

Pros:

Cons:

epociask commented 2 months ago
epociask commented 1 month ago

Continuing this thread - how do we determine a customer's rate limit without having them specifying it manually? CC - @samlaf, @bxue-l2, @teddyknox

samlaf commented 1 month ago

Continuing this thread - how do we determine a customer's rate limit without having them specifying it manually? CC - @samlaf, @bxue-l2, @teddyknox

Honestly rethinking about this.. is it really needed? Feels like a simple exponential backoff should be enough? Prob not worth overcomplicating things unless absolutely needed?

samlaf commented 3 weeks ago

Closing as not planned. This is too complicated and not needed, at least for now. Can reopen if some customer is interested.