Jacket for Laravel Optimization Playbook — Finding the real bottleneck in a Laravel application under load
LaravelFree to read · Open access · 13 of 13 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.

What it makes operable

  1. 01

    Profile before touching anything, and know which number you are moving

  2. 02

    Work the query layer, write contention and cache invalidation in that order

  3. 03

    Run queues, workers and Octane under load without introducing new failure modes

  4. 04

    Hold the gains with performance budgets and regression gates

Contents

13 of 13 published

Every chapter is free to read in the browser, cites its own sources, and stands on its own if you came for one decision rather than the whole argument.

  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.

In the age of AI

The advantage was never the model. It's knowing what to build with it — and having a team that can actually ship it.

That's the part I help with: finding where AI genuinely makes your business faster, deciding what's worth building, and standing behind it once it's live.

Four offices, one very full passport

Every dot on this map is a conversation I still remember.

World map showing ViitorCloud offices in Ahmedabad, Zürich, Washington D.C. and Port Louis, and the countries where Vishal Rajpurohit has spoken and travelled
Germany
Indonesia
Saudi Arabia
Spain
Japan
Denmark
Turkey
Singapore
Ireland
Czechia
France
Thailand
Sweden
Mexico
Qatar
Italy
South Korea
Poland
United Kingdom
Malaysia
Belgium
Canada
UAE
Netherlands
Vietnam
Norway
Oman
Portugal
Australia
Austria
New York, USA
Chicago, USA
Las Vegas, USA
San Francisco, USA
Los Angeles, USA
Ahmedabad, India — headquarters
Zürich, Switzerland
Washington, D.C., United States
Port Louis, Mauritius
  • Where I've spoken
  • Office
Sixty seconds from the roadQuick lessons and keynote moments — tap to watch