All books
Jacket for Laravel Optimization Playbook — Finding the real bottleneck in a Laravel application under load

Laravel

Laravel Optimization Playbook

Finding the real bottleneck in a Laravel application under load

Laravel is fast enough; applications are slow for a small number of repeatable, measurable reasons, and those should be found in a fixed order rather than by rewriting.

An application that got slower as it got busier does not need a new framework. It needs to be measured, then worked through in a fixed order: the query layer, then write contention, then cache invalidation, then queue saturation, then the runtime. This book runs that order with a measurement at every stage, and ends with the budgets and regression gates that stop the win from decaying the week after you ship it.

What it makes operable

  1. 01Profile before touching anything, and know which number you are moving
  2. 02Work the query layer, write contention and cache invalidation in that order
  3. 03Run queues, workers and Octane under load without introducing new failure modes
  4. 04Hold the gains with performance budgets and regression gates

Contents

13 of 13 published
  1. 01Measure Before You Touch AnythingProfiles, traces, and a baseline that makes the next change arguable.11 min
  2. 02Where the Queue Forms: Workers, Connections, UtilisationFixed pools, arrival rate, and why the ninety-ninth percentile breaks first.12 min
  3. 03The Query Layer: N+1, Indexes, and Eloquent RealityWhat Eloquent actually emits, and the indexes it assumes you added.11 min
  4. 04Reading at Scale: Pagination, Projections, ChunkingCursor pagination, narrower selects, and not hydrating a million models.11 min
  5. 05Writing at Scale: Transactions, Locks, ContentionLock scope, deadlocks, and the hot row that serialises your whole workload.11 min
  6. 06Cache Layers and Their InvalidationTags, TTLs and stampedes, with an explicit rule for what may go stale.12 min
  7. 07Queues, Workers, and Horizon Under LoadHead-of-line blocking, retry storms, and backlog age as the alarm that matters.12 min
  8. 08Octane and Long-Lived ProcessesState that leaks between requests once the process stops dying.12 min
  9. 09HTTP: Payloads, Compression, and the EdgeResponse size, cache headers, and work you can stop doing entirely.11 min
  10. 10Front-End Cost You Are Paying on the ServerEvery component update is a server round trip, and you are paying for all of them.11 min
  11. 11The PHP Runtime: 8.3 to 8.5, OPcache, JITOPcache, preloading, and the JIT that PHP ships switched off.12 min
  12. 12Load Testing That Predicts ProductionRepresentative mixes, warm caches, and a test whose result you can believe.11 min
  13. 13Staying Fast: Budgets and Regression GatesPerformance budgets in CI, so the improvement survives the next quarter.12 min

Evidence

1 sources

Third-party sources behind the book's premise. Every figure in them belongs to the party that published it and is attributed to them in the text.