Machine-translated by Google. Questions are authored in English.
Top

Discussion

State whether the following is true or false.
A function should be written so that running it twice with the same event is safe.

  • A.False only at small scales
  • B.True
  • C.False
  • D.True only at large scales

Answer: B

Correct answer: True

Event delivery is generally at-least-once, so retries after a timeout or a transient error can deliver the same event twice, and a function that is not idempotent will double-charge, double-post or corrupt its state. Writing with an idempotency key, or making the operation naturally repeatable, is therefore a requirement of the model rather than a refinement.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.