Azure Functions 00:00:01 A customer gets a receipt before the order finishes A pottery shop accepts a custom mug order that takes minutes to prepare. A web request should not remain open for the entire workflow. Follow the HTTP-triggered function as it durably hands work to the next stage. A request starts accept, and nothing else. In the illustrated function, an output binding writes the message to the queue. Handle a failed handoff rather than reporting acceptance for work that was never recorded. Once accepted, the customer receives HTTP two hundred two and can leave the request. The message starts work, which saves the order. The acceptance response is a promise about handoff. It is not proof that the mug order finished. Design a durable order identifier and a status path that let the customer discover what happened later. 00:00:48 Estimate what a thousand waiting orders could do Suppose twelve hundred queue messages have accumulated. In this simplified configuration an active instance can work on as many as twenty-four messages. The database behind the workers is the resource the shop cannot scale in a hurry. 1,200 messages wait. One instance works on up to 24. Twelve hundred divided by twenty-four gives fifty instances of parallel capacity in this model. This arithmetic is not a promise about the scale controller's instantaneous decision. 50 instances work on 1,200 messages, so the database sees 1,200 at once. A limit of 10 instances keeps it at 240. The queue takes longer, and that is fine. Fifty fully occupied instances could expose the database to twelve hundred simultaneous operations. A limit of ten would cap this illustrative concurrency at two hundred forty while increasing queue delay. Confirm your actual hosting plan, trigger and batching configuration. 00:01:45 Keep a broken order from consuming all the retries A worker receives a malformed delivery record. It fails, and the message can become visible for another attempt. Repeated processing does not repair invalid input. A transient database problem, however, might clear during a deliberate wait. work throws an error. The message becomes visible again. With the illustrated zero retry visibility delay, the retry budget can be consumed quickly. A worker crash has different visibility behavior from this handled invocation failure. In this default five-attempt example, the failed record is moved aside and other orders can continue. With a wait of 30 seconds, a database restart no longer uses up all five tries. The Azure Queue Storage trigger can move repeatedly failing work to a poison queue according to its configuration. Monitor that queue, preserve the original identifier, and fix the cause before replaying it. 00:02:38 An orchestrator restarts after charging the card The mug workflow reserves stock, charges a card and arranges shipment. A Durable Functions orchestrator may be re-executed from the beginning after a worker failure. Will that necessarily charge the card a second time? The orchestrator calls reserve and goes to sleep. Nothing waits in memory. reserve answers R7. The history holds it. charge has been called, then the instance with the orchestrator dies. The result C9 still reaches the history. In the shown history both earlier activity results are present. Replay uses those recorded results while rebuilding the orchestrator's control flow. Only ship really runs. Completed activity results recorded in history can be replayed into deterministic orchestrator code. External effects still need protection against activity retries and ambiguous completions. Give the payment operation a stable idempotency identity. 00:03:32 A clock can choose the wrong branch during replay Before noon an order takes the charge branch. The host restarts after noon. If the orchestrator reads the machine's wall clock again, identical history can now produce a different decision. Before noon the code chooses charge. After noon the same line chooses ship. The history says charge. The orchestration context returns replay-consistent time, so the same recorded decision follows the same branch. Use the deterministic orchestration time API for this decision and move nondeterministic external work to activities. The pottery shop can report acceptance promptly, control its downstream pressure and replay a workflow without inventing a new past.