Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

georgefromohio's avatar

Average Laravel Powered RESTApi Response Times

Making many assumptions, including assuming a reasonably average system (with good database indexing, good database design, good code logic etc.) what is the average time folks are getting for requests to a Laravel 8+ powered RESTApi with token based authentication and roles and permissions for each user?

For my setup - With Octane, a GET request to a resource pulling 50 rows from the database with 3 preloaded relationship, I'm around 5 seconds cold start. And then once the app is loaded into memory, around 200-300ms.

Before I start investing my time in a caching solution, is that about average? When there are no relationships to load, when no permissions to check, the app spits a response out in about 10-15ms.

0 likes
2 replies
martinbean's avatar

@georgefromohio It sounds like you need to actually identify where time is being spent. You may have N+1 problems if a query with no relationships loads in 10–15 ms, but then it jumps up to 20× that when you do load a relation or whatever. That sounds like your queries or schema maybe isn’t as optimised as it could be.

georgefromohio's avatar

Hmm... I did check for N+1, optimized all queries. Etc. I do have to note that my response time on a client like Postman differs from say what Clockwork says?

Example

GET /people/demographics

Postman - 256 ms
Clockwork - 93 ms

Please or to participate in this conversation.