Nextjs api routes edge runtime costs & limits

Hi, I'm new to cloudflare pages. I've deployed a nextjs website with api routes running on edge runtime. It's working smoothly so far. Only question is I don't see anything about requests to api routes on the pricing page. Is there any limit to the number of requests sent to the api routes? Or is it unlimited like any other static pages? Also I'm planning to deploy a long running function and I wonder if the edge runtime has a maximum timeout set for api routes.
4 Replies
Hello, I’m Allie!
Number of requests: if you are paying, then the limit is your wallet. As for timeout, there is no hard timeout, but there is a CPU Time Limit, and after 30 seconds, you are more likely to be evicted(which will cancel the request)
qwertyuiop
qwertyuiopOP7mo ago
Thank you! That makes sense. I'm on free plan right now. Is it the same limit as workers so 100k requests per day? Want to estimate when to move to a paid plan.
Hello, I’m Allie!
Yes. Also note that the 100k a day limit is for Workers AND Pages Functions requests
qwertyuiop
qwertyuiopOP7mo ago
Got it! Thank you!
Want results from more Discord servers?
Add your server