FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
How defer() in Laravel 11 Made Our API Responses 3x Faster Without Touching a Single Queue
How-ToWeb Development

How defer() in Laravel 11 Made Our API Responses 3x Faster Without Touching a Single Queue

via Dev.to WebdevSheikh Shahzaman4h ago

TL;DR: Laravel 11 introduced defer() which runs code after the HTTP response is sent to the user. No queues, no job classes, no workers. Just wrap your fire-and-forget logic in defer() and your API becomes instantly faster. I spent two days last year trying to figure out why our order API endpoint was taking 1.2 seconds to respond. The order itself was being created in about 80ms. So where was the rest of the time going? Turns out we were sending a confirmation email, tracking an analytics event, syncing inventory with a third-party service, and clearing a cache key. All of that happened synchronously before the response was sent back to the user. The user did not care about any of those things completing before they saw their order confirmation. They just wanted to know their order went through. The Old Way: Queues for Everything The typical advice is to push these tasks onto a queue. Create a job class, dispatch it, run a queue worker, set up monitoring, handle failed jobs. For a lar

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
7 views

Related Articles

What OpenClaw Gets Wrong Out of the Box (And How to Fix It)
How-To

What OpenClaw Gets Wrong Out of the Box (And How to Fix It)

Medium Programming • 2h ago

Android Remote Compose:讓 Android UI 不用發版也能更新
How-To

Android Remote Compose:讓 Android UI 不用發版也能更新

Medium Programming • 4h ago

How-To

Learn Something Old Every Day, Part XVIII: How Does FPU Detection Work?

Lobsters • 10h ago

“Learn to Code” Is Dead… Learn to Think Instead
How-To

“Learn to Code” Is Dead… Learn to Think Instead

Medium Programming • 12h ago

How-To

How One File Makes Claude Code Actually Follow Your Instructions

Medium Programming • 12h ago

Discover More Articles