Queue Everything That Can Wait

D
Dick Edidiong Bassey
·

The operations that must complete synchronously are fewer than most applications assume: validating input, checking authentication, performing the core state change, and returning the result.

Everything else can be queued: sending emails, generating PDFs, processing images, triggering webhooks, running analytics events, updating search indexes.

The benefits compound: the web request returns faster, the queued work can be retried automatically on failure, the queue workers can be scaled independently.

Queue what can wait. Your users will notice the difference.

— Dick Bassey | DevDick | 2022