I have developed an email verification tool using Laravel, hosted on EC2 instances with t3.xlarge, auto scaling, and load balancing. The verification process involves a Redis queue worker and Laravel Horizon for job management.
Bulk Email Verification Logic:
- When a user uploads a list of 10k emails,
- I dispatch a StartBulkEmailVerificationJob.
- This job utilizes Laravel's job batching to dispatch
- VerifyChunkBulkEmailVerificationJob, with each job processing a chunk of 35 emails.
- For a 10k-email list, this results in 286 VerifyChunkBulkEmailVerificationJob jobs being dispatched.
Challenge:
The current setup works smoothly for a single user, but when multiple users simultaneously upload 10k-email lists, subsequent users have to wait for the completion of the previous users' jobs.
Specific Questions:
Are there any recommended strategies or tools to optimize the parallel processing of bulk email verification jobs for multiple users in a Laravel + EC2 setup?
Are there additional features or configurations in Laravel Horizon or Redis queue that I may not be aware of, which could improve parallel processing and reduce waiting times for users?
Conclusion:
I'm looking for insights, recommendations, or best practices to enhance the scalability of my email verification tool in a multi-user scenario. Any advice on optimizing the existing setup or introducing new tools/strategies would be greatly appreciated. Thank you!