Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
High Performance Laravel
Nuruzzaman Milon
November 18, 2017
Technology
7
1.2k
High Performance Laravel
Use Laravel to build high-performance web application.
Nuruzzaman Milon
November 18, 2017
Tweet
Share
More Decks by Nuruzzaman Milon
See All by Nuruzzaman Milon
Why you should consider statically generated site for your next website?
milon
0
24
Tonic Application Architecture
milon
0
350
JavaScript for the rest of us
milon
0
5.6k
What are you expecting from next version of Laravel?
milon
1
1.5k
Other Decks in Technology
See All in Technology
金融領域のマルチプロダクトを効率よく開発・運用するためのシステム基盤と組織設計について / 2022-07-28-multi-product-platform
stajima
0
140
ソフトバンクのシナジーがもたらすクラウドソリューションについて、クラウドエンジニアが話してみた。
sbtechnight
0
300
ソフトバンクaPaaS領域への挑戦
sbtechnight
0
300
セキュキャンを卒業してその後
kurochan
0
380
OpenShiftのサポートを始めるぞ!高頻度で更新されるOSSを効果的にキャッチアップする仕組みを考えました!
loftkun
0
330
Amplifyで Webアプリケーションの 堅固な土台をサクッと構築する方法
kawasakiteruo
0
210
IBM Cloud Festa Online 2022 Summer
1ftseabass
PRO
0
190
COSCUP x KCD Taiwan 2020 - 那些年我們在開源社群的日子 - Cloud Native Taiwan
pohsien
0
120
CloudWatchアラームによるサービス継続のための監視入門 / Introduction to Monitoring for Service Continuity with CloudWatch Alarms
inomasosan
1
410
塩漬けにしているMySQL 8.0.xxをバージョンアップしたくなる、ここ数年でのMySQL 8.0の改善点 / MySQL Update 202208
yoshiakiyamasaki
1
590
インフラのテストに VPC Reachability Analyzer は外せないという話
nulabinc
PRO
2
690
Micro frontends and micro services
kashif98
0
110
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1020
420k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
498
130k
Infographics Made Easy
chrislema
233
17k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_i
25
15k
Docker and Python
trallard
27
1.6k
It's Worth the Effort
3n
172
26k
Streamline your AJAX requests with AmplifyJS and jQuery
dougneiner
127
8.5k
Code Review Best Practice
trishagee
44
9.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
351
21k
Raft: Consensus for Rubyists
vanstee
127
5.5k
Embracing the Ebb and Flow
colly
73
3.4k
Teambox: Starting and Learning
jrom
123
7.7k
Transcript
High performance Laravel
Hello! I am Nuruzzaman Milon Senior Software Engineer @Telenor Health
A\S @to_milon https://milon.im
I wrote a book on laravel ISBN: 978-984-33-9190-2 Buy @
https://milon.im/laravel
Sharing My There is no golden rule, you might have
different opinion. Let me learn from you.
Minimize plugins usage × Don’t use unnecessary plugins. × Don’t
import the whole library just for using a single functionality.
Use Eager loading × Try to avoid N+1 problem ×
Don’t load the whole collection, if you just need the count. × Use `select()` rather than `all()`
Trim your response × Don’t try to render all the
elements at a time, use pagination or lazy loading. × Don’t return, what you don’t need. × Use transformer. (Fractal, Resource etc.)
Use http2 × Use server push to load static assets.
× Use CDN. (if possible)
Optimize Autoloader × Optimize your autoload file × Use either
`composer dump-autoload -- optimize` Or `composer dump-autoload --classmap-authoritative`
Cache routes and configs × Cache your routes file- `php
artisan route:cache` × Cache your config file- `php artisan config:cache` × Don’t use `env()` function
Remove unused services × Comment `ServiceProvider` those are not in
use. × Use `Deferred` Service Providers.
Use Faster Drivers × Use redis driver for session. ×
Use memcached/redis driver for cache. × Use Redis, where you can.
Profile your query × Inspect your query. × Use a
good profiler. (Blackfire) × Use a debugbar while developing. × Cache your query.
Use queue for expensive task × Use queue for long
running task. × Use queue for CPU or memory intensive tasks. × Return early, if it’s possible. × Use a good monitoring tool. (Horizon)
Inspect Exceptions and Log × Use a good error reporting
tool like Bugsnag, Sentry etc. × Log every possible failed scenario. × Use `logrotate` to manage log files. × Use benchmarking tool. (ab, wrk etc.)
Consider lumen × Consider micro services. × Don’t built just
another monolithic application. × Decide wisely. (or cautiously?) × Avoid NANO services.
Place your screenshot here You Ain’t Gonna Need It.
THANKS! Any questions? You can find me at - @to_milon
contact@milon.im https://speakerdeck.com/milon/high-performance-laravel ??