Laravel Advanced & Architecture
5-8 Years (Senior)
Hard
Production Scenario
How do you debug and resolve Queue Worker starvation and RabbitMQ/Redis Queue backpressure in Laravel?
Real-World Scenario / Incident Description
A burst of 500,000 Welcome Email jobs blocked urgent Password Reset and Payment Verification jobs from processing for over 2 hours.
225 views
•
Updated 1 month ago
Solution: Strict Queue Prioritization & Dedicated Worker Pools
- Never dump all jobs into a single
defaultqueue. - Partition queues by SLA:
high,default,low,notifications:SendPasswordResetNotification::dispatch($user)->onQueue('high'); SendMarketingNewsletter::dispatch($campaign)->onQueue('low'); - Configure Supervisor with weighted prioritization:
# Dedicated High-Priority worker php artisan queue:work --queue=high,default,low --tries=3 --timeout=60 - Queue Rate Limiting:
public function middleware(): array { return [(new WithoutOverlapping($this->userId))->releaseAfter(60)]; }
Related Concepts:
#Queue Tuning
#Worker Starvation
#Redis
#Supervisor
#Priority Queues
More Laravel Advanced & Architecture Interview Questions
How does Laravel Octane handle state persistence across requests, and how do you prevent catastrophic memory leaks and data bleeding in singletons?
Read →
How do you prevent Deadlocks when processing concurrent financial transactions or inventory deductions across multiple queue workers in Laravel?
Read →
How does the Laravel Service Container resolve dependencies using Reflection, and what are the performance trade-offs in large applications?
Read →
How do you execute Zero-Downtime database migrations on tables with 50+ million rows without locking writes in production Laravel?
Read →
How do you architect Multi-Tenant database isolation in Laravel (Single DB vs Multi DB vs Schema Separation)?
Read →