Blog
TechnologyBy Catalina Pinzón2 min read

Don’t make your users wait: background jobs and queues

In 30 seconds

The problem

I click "Generate report", the screen spins and times out, so I click again.

A request answered at once while jobs wait in line and workers pick them up one by one.

The idea

Answer immediately and do the heavy work behind the scenes, with a queue and separate workers.

What to do

Move emails, PDFs, AI calls and syncs to a queue, with retries and visible failures.

Read in full

Full text

A user clicks "Generate report". The screen spins for forty seconds, then times out. They click again, and now two reports are being built. This is one of the most common and most avoidable problems in business software.

The core idea

Answer immediately, work behind the scenes. When a request needs heavy or slow work, the application does not do it on the spot. It places a job in a queue and responds right away. Separate workers pick up jobs and process them at their own pace, and the user is told when the result is ready.

What belongs in a queue

  • Emails and notifications
  • PDF and Excel generation
  • Image, video, and document processing
  • OCR and AI calls, which can take seconds and sometimes fail
  • Syncs with third-party APIs
  • Scheduled work: Reminders, clean-ups, payouts, and daily reports
  • Webhook processing, which we covered in The power of webhooks

What makes a queue reliable

  1. Automatic retries with backoff: A temporary failure waits a little longer each time instead of hammering a struggling service.

  2. Idempotent jobs: Running the same job twice must not charge a customer twice or send two emails.

  3. Visible failures: Jobs that keep failing land in a dead-letter list that a person is alerted about, rather than disappearing.

  4. Concurrency and rate limits: Respect the limits of the services you call, and avoid overloading your own database.

  5. Scheduling: Recurring tasks run on time, without anyone remembering to click a button.

  6. Monitoring: You can see how many jobs are waiting, how long they take, and how many are failing.

Keep users informed

Waiting is far more tolerable when it is honest. Show clear states such as queued, processing, and ready, and notify people by email or in real time when something finishes. The user should never wonder whether their click did anything.

Queues also pair naturally with elastic infrastructure: when the line grows, you add workers, which is the idea behind The cloud: the infinite ground.

At falcani, background processing is part of how we design applications from the start, because speed is not only how fast a page loads but also how quickly your users can get back to what they were doing.

Is your app making people wait? Let’s talk and we will find what should move to the background.

Want us to build it for your business?

Move emails, PDFs, AI calls and syncs to a queue, with retries and visible failures.

Tell us what you have in mind and we will answer by email.