๐Ÿš€ Performance Optimization in Laravel

Dheeraj jha (@thedijje)

"Great performance is not accidental; it's a result of deliberate design, meticulous engineering, and relentless pursuit of excellence."

- Linus Torvalds

๐Ÿคท๐Ÿปโ€โ™‚๏ธBut why?

  • ๐Ÿคฉ User experience
  • ๐Ÿค‘ Improved conversion rate
  • ๐Ÿ” SEO
  • ๐Ÿ’ฐ Scalability and Cost saving
  • ๐Ÿ“ฑMobile first world
  • ๐Ÿ˜Ž Competitive advantage

๐Ÿคท๐Ÿปโ€โ™‚๏ธ Why Performance?

1

Database optimization

3

Asset optimization

5

Optimizing Laravel Configuration

2

Caching stratagies

4

Queues and Background jobs

6

Testing & benchmarking

๐Ÿ’พ Database optimization

๐Ÿ’พ Database Optimization

  • Use Eloquent Query Optimization
  • Raw SQL and query builder
  • In Depth optimization
  • Indexing

1

Query optimization

  • Database Indexing
  • Database transactions
  • Procedures and functions

2

Schema level optimization

  • DB shrading
  • Table partitioning
  • Distributed query
  • Combination of Databases

3

Infra level

๐Ÿ’ญCaching Strategy

Caching Stratagy

๐Ÿ’ฝ Database Caching

๐Ÿ“Asset/Media Caching

โฉ Redis/ Memcache

๐Ÿ”† Asset optimization

  • Minification
  • Compression
  • Caching
  • Lazy loading
  • Use of Content Delivery Networks(CDN)
  • Asset Concatenation & Distribution
  • Optimized Images
  • Mind the view

๐Ÿ”† Asset optimization

๐ŸชœQueues and Background jobs

Queues & Background jobs

Queues

Background jobs

Workers

โš™๏ธ Optimizing Laravel Configuration

  • OPcache Configuration
  • HTTP Compression
  • Route Caching
  • Eager Loading
  • Optimized Composer Autoloading

โš™๏ธ Optimizing Laravel Configuration

โœ… Test & Benchmarking

  • PHPUnit
  • Laravel Dusk
  • Development
  • Apache JMeter
  • Siege
  • Laravel Telescope

โœ… Tets and Benchmarking

โœ… All set

Stay powerful, Keep exploring

Any Questions??

๐Ÿ™‰

Dheeraj jha

DevOps Engineer, Traveller, Photographer, and Community volunteer for Laravel India

Lets connect

Twitter.com/thedijje

Hello@thedijje.com

ย