How does queue-based work distribution differ from publish-subscribe?
An event bus routes events to consumers by rules, while publish-subscribe commonly delivers a copy to each subscriber. A queue commonly distributes work among competing consumers.
Study Event-Driven Serverless Workflows with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
How does queue-based work distribution differ from publish-subscribe?
An event bus routes events to consumers by rules, while publish-subscribe commonly delivers a copy to each subscriber. A queue commonly distributes work among competing consumers.
What distinguishes choreography from orchestration?
In choreography, services react to events and publish further events. In orchestration, a workflow service explicitly tracks and coordinates the steps.
In document processing, what can happen after a function extracts metadata?
A function can extract document metadata and place a processing task on a queue. A consumer processes the task and stores the result in a database; a workflow or another function can record completion and notify the client.
What does a queue provide between producers and consumers?
A queue temporarily holds messages between producers and consumers, buffering work when consumers are slower, work can wait, or temporary failures should not lose it. Processing may finish after the initial request returns.
When should an API process a request asynchronously?
Use a synchronous API when the caller needs an immediate result. For longer-running work, return an acknowledgment and process the request asynchronously.
How do an event source and event-driven function connect application components?
An event records something that happened; its source produces or delivers it, and an event-driven function runs in response. Delivery may be push or platform polling (pull), so the function should validate and interpret the event format.
What does “serverless” mean?
Serverless does not mean there are no servers. The cloud provider manages much of the infrastructure and scales resources according to configured service behavior, letting teams focus on application behavior.
How can a function avoid charging a customer twice after duplicate event delivery?
Make processing idempotent: handling the same event again should not cause an unintended second effect. A stable event or transaction identifier can help detect completed work.
Where should durable data live when a function needs to scale or retry?
Keep functions focused on one clear piece of business logic and stateless. Store durable data in a database or object store rather than temporary function memory; object storage suits files, while databases suit structured records and queries.
What should happen to messages that repeatedly fail processing?
Route messages that repeatedly fail to a dead-letter destination for inspection. Set timeouts and retry policies appropriate to the operation, and monitor errors, queue depth, latency, and workflow failures.
In an uploaded-document workflow, where are the file and processing result stored?
The client stores the file in object storage; a storage event can start a workflow. A function extracts metadata and queues a task, then a consumer processes it and stores the result in a database.
How can an API respond promptly when payment processing takes longer?
For longer-running work, an API can return an acknowledgment and process the request asynchronously. A queue can hold a task while a separate function handles it, so the initial response need not wait for completion.
Practice cloud benefits, deployment models, scalability, elasticity and AWS Cloud concepts.
Comprehensive AWS Certified Cloud Practitioner practice covering cloud concepts, security, AWS services and pricing.
Focused study of relational and nonrelational databases and service selection concepts.
Focused study of containers, orchestration and container service use cases.
Focused study of instances, instance types, scaling and compute use cases.
Focused study of objects, buckets, storage classes and storage use cases.