LaravelAdvanced12 chapters

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.

Written for: Laravel teams whose application slowed down as it succeeded.

No chapter is published yet. The full contents below is the finished outline; chapters go live as they are written, and none of them will sit behind a signup.

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

What it makes operable

Outcomes, not topic coverage.

  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

Complete contents

12 chapters, in order.

Each chapter settles one decision, so it can be read on its own. Read in sequence to build the argument the book is making.

  1. 01

    Measure Before You Touch Anything

    Profiles, traces, and a baseline that makes the next change arguable.

    In writing
  2. 02

    The Query Layer: N+1, Indexes, and Eloquent Reality

    What Eloquent actually emits, and the indexes it assumes you added.

    In writing
  3. 03

    Reading at Scale: Pagination, Projections, Chunking

    Cursor pagination, narrower selects, and not hydrating a million models.

    In writing
  4. 04

    Writing at Scale: Transactions, Locks, Contention

    Lock scope, deadlocks, and the hot row that serialises your whole workload.

    In writing
  5. 05

    Cache Layers and Their Invalidation

    Tags, TTLs and stampedes, with an explicit rule for what may go stale.

    In writing
  6. 06

    Queues, Workers, and Horizon Under Load

    Head-of-line blocking, retry storms, and backlog age as the alarm that matters.

    In writing
  7. 07

    Octane and Long-Lived Processes

    State that leaks between requests once the process stops dying.

    In writing
  8. 08

    HTTP: Payloads, Compression, and the Edge

    Response size, cache headers, and work you can stop doing entirely.

    In writing
  9. 09

    Front-End Cost You Are Paying on the Server

    Over-fetching components and the render work sitting behind them.

    In writing
  10. 10

    The PHP Runtime: 8.3 to 8.5, OPcache, JIT

    Runtime settings that move production numbers, and the ones that are folklore.

    In writing
  11. 11

    Load Testing That Predicts Production

    Representative mixes, warm caches, and a test whose result you can believe.

    In writing
  12. 12

    Staying Fast: Budgets and Regression Gates

    Performance budgets in CI, so the improvement survives the next quarter.

    In writing

Evidence

What this book is arguing against.

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.