Performance Issues in Laravel Project #1577
Unanswered
luchinilato
asked this question in
Support
Replies: 1 comment
-
Hi! That sounds really weird indeed, how are you measuring the latency? From your machine? It could be interesting to look at the Lambda metrics directly to see how long the PHP execution takes, and rule it if it is PHP that is slow or the whole network trip. Also make sure you don't look at the average response time with low number of requests. For example if you have a 1s cold start, then all requests take 100ms, but you measure with 5 requests, then the average will be (1000 + 4×100) -> 280ms, but in reality 99% of requests will be processed in 100ms. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello.
I have a laravel project and I'm having performance issues that I believe is due to configuration.
I created a route that does no database query, it just returns a json with a text of "Hello".
I have the following results:
local - 50ms
VPS server - 70ms
Lambda with Bref - 300ms
To be clear, both the lambda and the VPS server are in the same country and state.
I have the feeling that Laravel caches are not being executed on Bref (lambda).
Before deploying with Bref, I ran the following commands from the Laravel documentation:
composer install --optimize-autoloader --no-dev
php artisan config:cache
php artisan event:cache
php artisan route:cache
after executing each command above, I run:
serverless deploy --stage=prod
note: debug is off
I would like to know if I'm doing it the right way.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions