Webhook
Webhook
Ein Webhook ist ein HTTP-Callback, der gesendet wird, wenn ein Ereignis eintritt. Es sagt einem anderen System, dass es reagieren soll.
Ein weiteres Beispiel
Ein Zahlungsdienst sendet ein signiertes payment.succeeded event zum Bestelldienst.
Hauptteile
- 01Originating request
- 02Resolution or processing hop
- 03Response, timing, and failure
Verwenden Sie es, wenn
Jede Nutzlast signieren. Verarbeitung idempotent machen, fehlgeschlagene Sendungen erneut versuchen und dauerhafte Ereignisprotokolle führen.
Nutze es nicht, wenn
Gehe niemals davon aus, dass Ereignisse in der Reihenfolge oder nur einmal eintreffen. Vertraue niemals einem Absender, den du nicht überprüft hast.
In Code verwendeter Name
POST callback + signature Vor dem Ausliefern
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome: Complete the task with Webhook (Webhook). User context: Ein Zahlungsdienst sendet ein signiertes payment.succeeded event zum Bestelldienst. Technical concept or control: Webhook (Webhook). Why it fits: Jede Nutzlast signieren. Verarbeitung idempotent machen, fehlgeschlagene Sendungen erneut versuchen und dauerhafte Ereignisprotokolle führen. Do not use it when: Gehe niemals davon aus, dass Ereignisse in der Reihenfolge oder nur einmal eintreffen. Vertraue niemals einem Absender, den du nicht überprüft hast. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary): Kein einziger offizieller Standard kontrolliert den gesamten Begriff. Seine Bedeutung kann sich zwischen Teams, Plattformen oder Frameworks ändern. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
Diese Anfrage prüfen
Review how Webhook (Webhook) is used now. Definition: Ein Webhook ist ein HTTP-Callback, der gesendet wird, wenn ein Ereignis eintritt. Es sagt einem anderen System, dass es reagieren soll. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.