timboozle2's avatar

Best practice Async programming in Laravel

Hi, On a daily basis I process a lot of data and files. About 70.000 database inserts, updates and deletes and a couple of hundred images are downloaded, resized and uploaded to S3. Though already pretty optimised, it still takes a long time. It would be nice and a huge speed boost to process all tasks asynchronously.

Let's say I have 100k+ separate small tasks that I want to get out of the way as fast as possible. Would it be best to queue them all and use an async queue driver, for example? (https://github.com/barryvdh/laravel-async-queue)

I also thought of creating an endpoint for each task and calling them all asynchronously with Guzzle's built in functionalities.

I have no idea how to approach this so any suggestion would be appreciated

0 likes
0 replies

Please or to participate in this conversation.