Stencel AcademyHow Infrastructure Works →
Part 3 · Lesson 15 · Advanced

Queues & Workers

Answer the user now; do the slow work later.

In this interactive Infrastructure lesson from Stencel Academy you don't just read — you type real commands like curl -X POST https://api.stencel.ai/v1/batch -d '{"job":"embed-docs"}', redis-cli -h queue-01 LLEN jobs and watch the machine respond on a live, animated map. It is part of the free How Infrastructure Works course.

Key takeaway: Return 202, enqueue the job, let workers grind — the user never waits on slow work.

Before this lesson

Builds on: Caches & CDNs.

What you'll practise

Terms you'll learn

message queueworker202 Acceptedproducer / consumerdead-letter queue

Check your understanding

The API returned 202 in 12ms but the job takes 38s. How?
Open the interactive lesson →