Skip to content
About The Journey How I Can Help Gallery Insights Contact Me
Cover of Laravel Optimization Playbook by Vishal Rajpurohit.
Laravel Free 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. 01 Measure Before You Touch Anything Profiles, traces, and a baseline that makes the next change arguable. 11 min
  2. 02 Where the Queue Forms: Workers, Connections, Utilisation Fixed pools, arrival rate, and why the ninety-ninth percentile breaks first. 11 min
  3. 03 The Query Layer: N+1, Indexes, and Eloquent Reality What Eloquent actually emits, and the indexes it assumes you added. 11 min
  4. 04 Reading at Scale: Pagination, Projections, Chunking Cursor pagination, narrower selects, and not hydrating a million models. 10 min
  5. 05 Writing at Scale: Transactions, Locks, Contention Lock scope, deadlocks, and the hot row that serialises your whole workload. 11 min
  6. 06 Cache Layers and Their Invalidation Tags, TTLs and stampedes, with an explicit rule for what may go stale. 11 min
  7. 07 Queues, Workers, and Horizon Under Load Head-of-line blocking, retry storms, and backlog age as the alarm that matters. 11 min
  8. 08 Octane and Long-Lived Processes State that leaks between requests once the process stops dying. 11 min
  9. 09 HTTP: Payloads, Compression, and the Edge Response size, cache headers, and work you can stop doing entirely. 10 min
  10. 10 Front-End Cost You Are Paying on the Server Every component update is a server round trip, and you are paying for all of them. 10 min
  11. 11 The PHP Runtime: 8.3 to 8.5, OPcache, JIT OPcache, preloading, and the JIT that PHP ships switched off. 11 min
  12. 12 Load Testing That Predicts Production Representative mixes, warm caches, and a test whose result you can believe. 11 min
  13. 13 Staying Fast: Budgets and Regression Gates Performance budgets in CI, so the improvement survives the next quarter. 11 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
Sixty seconds from the road Quick lessons and keynote moments — tap to watch