IPFS api rate limit

Hi, Infura.

I’m worried about the rate limit when using IPFS apis, so I want to ask a question about it.
Currently, the rate limit is not that problematic because it is in the early stages of our project, but we are going to develop the code in preparation for this.

Regarding this,

  1. It should be possible to recognize at the code level that the rate limit has been hit. I wonder how the return message is explicitly returned when the rate limit per account is exceeded.

  2. If the rate limit is reached, is the best solution to try repeatedly after a certain period of time?

  3. Is there a way to allow the rate limit to a higher level with paid IPFS plan? The rate limit is automatically determined according to network usage, so isn’t there any way we can control it?

@ddevkim,

  1. If the rate limit has been reached, it should return error code 429 (too many requests)

  2. There are ways to space out requests as well as wait for the cooldown timer to pass. A cooldown period is recommend when rate limits are reached. For free plans the rate limit is variable. Most methods for write API calls have a 10 requests/second limit.You can retrieve IPFS data using the API with a limit of 100 requests/second. You can read more about IPFS rate limits here: https://docs.infura.io/infura/networks/ipfs/getting-started/request-rate-limits

10 requests/second limit for the following endpoints:

  • /api/v0/add`
  • /api/v0/pin/add`
  1. There are no custom rate for paid IPFS plan, it only affects the storage size.

Kind regards,
Alex | Infura Support

Hi, thanks for reply.

By the way, the uri you linked, it says

Users performing authenticated requests associated with a particular project have wider rate limits and can achieve more requests per second.

Could you please let me know what exactly mean the “authenticated requests”?
Does it mean that an api request to the end point assigned to the project with authentication information in http header?
And if so, in this case, can we get an api rate limit of more than 10 requests per second?

Sincerely,
ddevkim

Hello @ddevkim,

The requests you send to IPFS can be authenticated by also providing your project id & secret while performing the request, like this:

curl -X POST -F file=@myfile -u "PROJECT_ID:PROJECT_SECRET" "https://ipfs.infura.io:5001/api/v0/add"

One important benefit of using authenticated requests is the increased requests per second limit that comes with them. More examples of authenticated IPFS requests can be found here.

Thanks.
I have been already using authenticated way to pin add files to IPFS.
The question is, how much can I get an increment in regarding the api request limit per second?