Overview
Direct Answer
A webhook is a user-defined HTTP callback mechanism that enables one application to send real-time event notifications to another application's designated endpoint when a specific condition or trigger occurs. Unlike traditional polling, webhooks push data immediately upon event occurrence rather than requiring the receiving system to request updates at intervals.
How It Works
When a monitored event is triggered in the source application, the system constructs an HTTP request (typically POST) containing event data and transmits it to a pre-configured URL endpoint on the target system. The target application receives and processes this payload synchronously or queues it for asynchronous handling, then returns a status response. If delivery fails, the source application may implement retry logic with exponential backoff to ensure reliability.
Why It Matters
Webhooks eliminate latency inherent in polling-based architectures, reducing bandwidth consumption and enabling genuinely real-time system integration. This matters for payment processing, incident alerting, inventory synchronisation, and customer communication workflows where delays carry financial or operational consequences.
Common Applications
Payment gateways use webhooks to notify merchants of transaction results; project management platforms trigger notifications on task updates; version control systems alert deployment pipelines when code is committed; and customer relationship management systems synchronise data changes with accounting software.
Key Considerations
Webhook implementations must address security concerns including request validation, authentication tokens, and HTTPS enforcement. Ordering guarantees are not provided by most webhook systems, requiring idempotency handling on the receiver side to prevent duplicate processing.
Cross-References(1)
More in Software Engineering
Memory Leak
Paradigms & PatternsA type of resource leak where a program fails to release memory that is no longer needed.
Circuit Breaker Pattern
ArchitectureA design pattern that prevents cascading failures by stopping calls to a failing service temporarily.
WebSocket
Paradigms & PatternsA communication protocol providing full-duplex communication channels over a single persistent TCP connection.
Version Control
Development PracticesA system that records changes to files over time so that specific versions can be recalled later.
Performance Testing
Quality & TestingEvaluating a system's speed, responsiveness, and stability under various load conditions.
NoSQL Database
Paradigms & PatternsA non-relational database designed for specific data models offering flexible schemas for modern applications.
Relational Database
Paradigms & PatternsA database structured to recognise relations among stored items, organised in tables with rows and columns.
Continuous Delivery
Development PracticesA software practice where code changes can be released to production at any time through automated pipelines.