हमारी Performance & Scalability श्रृंखला का हिस्सा
पूरी गाइड पढ़ें2025 मर्ज.डेव सर्वेक्षण में पाया गया कि 62% एपीआई एकीकरण विफलताएं वेबहुक डिलीवरी मुद्दों से उत्पन्न होती हैं, फिर भी केवल 23% इंजीनियरिंग टीमों के पास समर्पित वेबहुक निगरानी है। वेबहुक भ्रामक रूप से सरल हैं - एक सिस्टम से दूसरे सिस्टम में HTTP पोस्ट - लेकिन उत्पादन में, वे सूक्ष्म और निराशाजनक तरीकों से विफल हो जाते हैं।
यह मार्गदर्शिका संपूर्ण वेबहुक जीवनचक्र को कवर करती है: यह समझने से लेकर कि वेबहुक विफल क्यों होते हैं, मजबूत डिबगिंग वर्कफ़्लोज़ बनाने से लेकर, उत्पादन-ग्रेड मॉनिटरिंग लागू करने तक जो आपके उपयोगकर्ताओं से पहले समस्याओं को पकड़ लेता है।
मुख्य बातें
- वेबहुक चुपचाप विफल हो जाता है - एपीआई कॉल के विपरीत जहां आपके कोड को त्रुटि प्रतिक्रिया मिलती है, वेबहुक विफलता प्रेषक की ओर से होती है और आपके सिस्टम को कभी पता नहीं चलता कि अनुरोध का प्रयास किया गया था जब तक कि आपके पास निगरानी न हो।
- पांच सबसे आम वेबहुक विफलताएं हैं: एंडपॉइंट पहुंच योग्य नहीं (डीएनएस/नेटवर्क), एसएसएल प्रमाणपत्र समस्याएं, टाइमआउट (प्रसंस्करण में बहुत लंबा समय लगा), गलत पेलोड पार्सिंग, और हस्ताक्षर सत्यापन विफलता।
- निष्क्रियता अनिवार्य है - पुनः प्रयास के कारण वेबहुक एक से अधिक बार वितरित किया जा सकता है, इसलिए आपके हैंडलर को एक ही परिणाम देना होगा चाहे वह एक पेलोड को एक बार संसाधित करता हो या दस बार।
- हस्ताक्षर सत्यापन HMAC-SHA256 का उपयोग वेबहुक सुरक्षा के लिए उद्योग मानक है - उत्पादन में कभी भी असत्यापित पेलोड की प्रक्रिया न करें।
- संरचित लॉगिंग और अलर्टिंग मुद्दों को मिनटों में पकड़ लेता है, जबकि डेड लेटर कतारें सुनिश्चित करती हैं कि कोई भी घटना स्थायी रूप से खो न जाए।
1. वेबहुक आर्किटेक्चर फंडामेंटल
डिबगिंग से पहले, समझें कि वेबहुक सिस्टम के माध्यम से कैसे प्रवाहित होते हैं:
┌──────────┐ HTTP POST ┌──────────────┐ Queue ┌──────────────┐
│ Source │ ──────────────────>│ Your Server │ ────────────> │ Processor │
│ (Stripe, │ Headers + JSON │ (Receiver) │ Async job │ (Handler) │
│ Shopify) │ │ │ │ │
└──────────┘ └──────────────┘ └──────────────┘
│ │ │
│ Expects 2xx within │ Verify signature │ Business logic
│ 5-30 seconds │ Parse payload │ Database writes
│ │ Enqueue for processing │ Trigger side effects
│ Retries on failure │ Return 200 immediately │ Log completion
└────────────────────────────────┘ └──────────────────
महत्वपूर्ण डिजाइन सिद्धांत: जितनी जल्दी हो सके वेबहुक (रिटर्न 200) को स्वीकार करें, फिर इसे अतुल्यकालिक रूप से संसाधित करें। अधिकांश वेबहुक प्रेषकों के पास आक्रामक टाइमआउट (5-30 सेकंड) होते हैं और यदि आपका एंडपॉइंट समय पर प्रतिक्रिया नहीं देता है तो वे पुनः प्रयास करेंगे।
2. पांच सबसे आम वेबहुक विफलताएं
विफलता 1: समापन बिंदु पहुंच योग्य नहीं
# Symptoms: Sender shows "connection refused" or "DNS resolution failed"
# Common causes:
# - Firewall blocking the sender's IP range
# - DNS misconfiguration after domain migration
# - Load balancer health check failing
# - Server crashed or not started
# Diagnostic steps:
# 1. Test connectivity from outside your network
curl -X POST https://your-domain.com/webhooks/stripe \
-H "Content-Type: application/json" \
-d '{"test": true}' \
-v # Verbose output shows connection details
# 2. Check DNS resolution
nslookup your-domain.com
dig your-domain.com +short
# 3. Check if the port is listening
nc -zv your-domain.com 443
# 4. Check firewall rules (if you have server access)
sudo ufw status
sudo iptables -L -n | grep 443
विफलता 2: एसएसएल प्रमाणपत्र मुद्दे
# Symptoms: "SSL handshake failed", "certificate expired", "self-signed cert"
# Webhook senders REQUIRE valid SSL certificates
# Check certificate expiry
echo | openssl s_client -servername your-domain.com -connect your-domain.com:443 2>/dev/null | openssl x509 -noout -dates
# Check full certificate chain
openssl s_client -connect your-domain.com:443 -showcerts < /dev/null 2>/dev/null
# Common fix: renew Let's Encrypt certificate
# sudo certbot renew --force-renewal
# sudo systemctl reload nginx
विफलता 3: समय समाप्त
# Symptoms: Sender retries because your endpoint took too long
# Solution: Acknowledge immediately, process asynchronously
# BAD: Processing inline (may take 10+ seconds)
@app.route('/webhooks/stripe', methods=['POST'])
def bad_webhook_handler():
event = parse_stripe_event(request)
process_payment(event) # Database queries, external API calls
send_confirmation_email(event) # SMTP call
update_inventory(event) # More database queries
return jsonify({'status': 'ok'}), 200 # Too late — Stripe already timed out
# GOOD: Acknowledge immediately, process in background
@app.route('/webhooks/stripe', methods=['POST'])
def good_webhook_handler():
# Verify signature FIRST (fast)
verify_stripe_signature(request)
# Enqueue for background processing
task_queue.enqueue('process_stripe_event', request.json)
# Return 200 within milliseconds
return jsonify({'status': 'received'}), 200
विफलता 4: पेलोड पार्सिंग त्रुटियाँ
# Symptoms: 400/500 errors, "unexpected token", type errors
# Cause: Assumptions about payload structure that break with API updates
# BAD: Assuming structure
def process_order(payload):
customer_email = payload['data']['object']['customer']['email'] # KeyError!
# GOOD: Defensive parsing
def process_order(payload):
try:
data = payload.get('data', {})
obj = data.get('object', {})
customer = obj.get('customer', {})
# Customer might be a string (ID) or an object
if isinstance(customer, str):
customer_email = None # Need to fetch from API
else:
customer_email = customer.get('email')
if not customer_email:
logger.warning(f"No customer email in webhook: {payload.get('id')}")
return
except Exception as e:
logger.exception(f"Failed to parse webhook payload: {e}")
raise
विफलता 5: हस्ताक्षर सत्यापन विफलता
import hmac
import hashlib
def verify_stripe_signature(request):
"""Verify Stripe webhook signature."""
payload = request.data # Raw bytes, NOT parsed JSON
sig_header = request.headers.get('Stripe-Signature', '')
webhook_secret = os.environ['STRIPE_WEBHOOK_SECRET']
# Parse the signature header
elements = dict(item.split('=', 1) for item in sig_header.split(','))
timestamp = elements.get('t')
signature = elements.get('v1')
if not timestamp or not signature:
raise ValueError('Missing signature components')
# Compute expected signature
signed_payload = f'{timestamp}.{payload.decode("utf-8")}'
expected = hmac.new(
webhook_secret.encode('utf-8'),
signed_payload.encode('utf-8'),
hashlib.sha256
).hexdigest()
if not hmac.compare_digest(expected, signature):
raise ValueError('Signature verification failed')
# Check timestamp freshness (prevent replay attacks)
import time
tolerance = 300 # 5 minutes
if abs(time.time() - int(timestamp)) > tolerance:
raise ValueError('Webhook timestamp too old')
सामान्य हस्ताक्षर सत्यापन गलतियाँ:
- सत्यापित करने से पहले JSON को पार्स करना (कच्ची बॉडी को बदल देता है)
- गलत रहस्य का उपयोग करना (परीक्षण बनाम लाइव मोड)
- स्थिर-समय तुलना का उपयोग नहीं करना (
hmac.compare_digest) - फ्रेमवर्क मिडलवेयर आपके हैंडलर द्वारा देखे जाने से पहले अनुरोध निकाय को संशोधित करता है
3. डिबगिंग उपकरण
एनग्रोक - स्थानीय समापन बिंदुओं को उजागर करें
# Install and expose local port
ngrok http 3001
# Output:
# Forwarding https://abc123.ngrok-free.app -> http://localhost:3001
# Use this URL as your webhook endpoint in the sender's dashboard
# ngrok provides a web inspector at http://127.0.0.1:4040
# - See every request/response pair
# - Replay failed webhooks
# - Inspect headers and bodies
webhook.site — त्वरित परीक्षण
# 1. Go to https://webhook.site — get a unique URL
# 2. Configure that URL as your webhook endpoint
# 3. Trigger events and see payloads in real-time
# 4. Copy the payload format for your handler development
कर्ल - मैन्युअल परीक्षण
# Simulate a Stripe checkout.session.completed webhook
curl -X POST http://localhost:3001/api/billing/webhook \
-H "Content-Type: application/json" \
-H "Stripe-Signature: t=1616161616,v1=abc123..." \
-d '{
"id": "evt_test_123",
"type": "checkout.session.completed",
"data": {
"object": {
"id": "cs_test_456",
"customer": "cus_test_789",
"amount_total": 4999,
"currency": "usd",
"metadata": {
"product_id": "42",
"user_id": "7"
}
}
}
}'
# Watch for the response status and body
संरचित लॉगिंग
import structlog
import json
from datetime import datetime
logger = structlog.get_logger()
def log_webhook_event(request, response_status, processing_time_ms, error=None):
"""Log every webhook with full context for debugging."""
log_data = {
'event': 'webhook_received',
'timestamp': datetime.utcnow().isoformat(),
'source': detect_webhook_source(request),
'event_type': request.json.get('type', 'unknown'),
'event_id': request.json.get('id', 'unknown'),
'method': request.method,
'path': request.path,
'content_length': request.content_length,
'response_status': response_status,
'processing_time_ms': processing_time_ms,
'ip_address': request.remote_addr,
'user_agent': request.headers.get('User-Agent', ''),
}
if error:
log_data['error'] = str(error)
log_data['error_type'] = type(error).__name__
logger.error('webhook_failed', **log_data)
else:
logger.info('webhook_processed', **log_data)
4. पुनः प्रयास रणनीतियाँ
अधिकांश वेबहुक प्रेषक घातीय बैकऑफ़ के साथ स्वचालित पुनर्प्रयास लागू करते हैं। स्ट्राइप 24 घंटों में 3 बार तक पुनः प्रयास करता है। Shopify 48 घंटों में 19 बार तक पुनः प्रयास करता है। आपके सिस्टम को इडेम्पोटेंसी कुंजियों के माध्यम से डुप्लिकेट डिलीवरी को संभालने के लिए डिज़ाइन किया जाना चाहिए, और आपको प्रसंस्करण विफलताओं के लिए अपनी स्वयं की पुनः प्रयास कतार लागू करनी चाहिए ताकि डेटाबेस टाइमआउट जैसी क्षणिक त्रुटियां स्थायी रूप से घटनाओं को न खोएं।
प्रेषक पुनः प्रयास नीतियाँ
| प्लेटफार्म | अधिकतम पुनर्प्रयास | टाइमआउट विंडो | बैकऑफ़ पैटर्न |
|---|---|---|---|
| धारी | 3 | 24 घंटे | घातीय |
| शॉपिफाई | 19 | 48 घंटे | घातीय |
| गिटहब | 3 | 1 घंटा | निश्चित (10 मिनट) |
| पेपैल | 15 | 3 दिन | घातीय |
| ट्विलियो | 1 | तत्काल | कोई नहीं |
अपनी स्वयं की पुनः प्रयास कतार बनाना
// Node.js retry queue with exponential backoff
const Bull = require('bull');
const webhookQueue = new Bull('webhooks', {
redis: { host: 'localhost', port: 6379 },
defaultJobOptions: {
attempts: 5,
backoff: {
type: 'exponential',
delay: 2000, // 2s, 4s, 8s, 16s, 32s
},
removeOnComplete: 100,
removeOnFail: false, // Keep failed jobs for analysis
},
});
// Producer: enqueue webhook for processing
async function enqueueWebhook(eventType, payload, source) {
await webhookQueue.add(eventType, {
payload,
source,
receivedAt: new Date().toISOString(),
idempotencyKey: payload.id || `${source}-${Date.now()}`,
});
}
// Consumer: process webhooks
webhookQueue.process('checkout.session.completed', async (job) => {
const { payload, idempotencyKey } = job.data;
// Check idempotency
const processed = await redis.get(`webhook:${idempotencyKey}`);
if (processed) {
console.log(`Skipping duplicate webhook: ${idempotencyKey}`);
return { status: 'duplicate', key: idempotencyKey };
}
try {
// Process the event
await handleCheckoutCompleted(payload);
// Mark as processed (TTL 48h)
await redis.setex(`webhook:${idempotencyKey}`, 172800, 'processed');
return { status: 'success' };
} catch (error) {
// Will be retried automatically by Bull
throw error;
}
});
// Dead letter handler
webhookQueue.on('failed', (job, error) => {
if (job.attemptsMade >= job.opts.attempts) {
console.error(`Webhook permanently failed after ${job.attemptsMade} attempts:`, {
eventType: job.name,
idempotencyKey: job.data.idempotencyKey,
error: error.message,
});
// Send alert to Slack/PagerDuty
alertService.sendCritical('Webhook permanently failed', {
job: job.id,
event: job.name,
error: error.message,
});
}
});
5. नपुंसकता कार्यान्वयन
import hashlib
import redis
redis_client = redis.Redis(host='localhost', port=6379, db=0)
def process_webhook_idempotently(event_id, event_type, payload, handler_fn):
"""Ensure a webhook is processed exactly once."""
# Create idempotency key
idem_key = f"webhook:processed:{event_id}"
# Check if already processed (atomic operation)
if redis_client.exists(idem_key):
logger.info(f"Skipping duplicate webhook: {event_id}")
return {'status': 'duplicate'}
# Set a processing lock (prevents concurrent processing)
lock_key = f"webhook:lock:{event_id}"
lock_acquired = redis_client.set(lock_key, '1', nx=True, ex=60)
if not lock_acquired:
logger.warning(f"Webhook already being processed: {event_id}")
return {'status': 'in_progress'}
try:
# Process the event
result = handler_fn(event_type, payload)
# Mark as processed (keep for 48 hours)
redis_client.setex(idem_key, 172800, json.dumps({
'processed_at': datetime.utcnow().isoformat(),
'result': str(result),
}))
return {'status': 'processed', 'result': result}
except Exception as e:
# Release lock so it can be retried
redis_client.delete(lock_key)
raise
finally:
redis_client.delete(lock_key)
6. मॉनिटरिंग डैशबोर्ड
ट्रैक करने के लिए मुख्य मेट्रिक्स
| मीट्रिक | लक्ष्य | चेतावनी सीमा |
|---|---|---|
| डिलिवरी सफलता दर | >99.5% | <98% |
| औसत प्रसंस्करण समय | <500ms | > 2000ms |
| कतार की गहराई | < 100 | >500 |
| डुप्लिकेट दर | <5% | > 15% |
| हस्ताक्षर सत्यापन विफलताएँ | 0 | >3/घंटा |
| मृत पत्र कतार आकार | 0 | >10 |
प्रोमेथियस मेट्रिक्स उदाहरण
from prometheus_client import Counter, Histogram, Gauge
# Counters
webhook_received_total = Counter(
'webhook_received_total',
'Total webhooks received',
['source', 'event_type']
)
webhook_processed_total = Counter(
'webhook_processed_total',
'Total webhooks successfully processed',
['source', 'event_type']
)
webhook_failed_total = Counter(
'webhook_failed_total',
'Total webhook processing failures',
['source', 'event_type', 'error_type']
)
webhook_duplicate_total = Counter(
'webhook_duplicate_total',
'Duplicate webhook deliveries skipped',
['source']
)
# Histograms
webhook_processing_duration = Histogram(
'webhook_processing_duration_seconds',
'Time to process a webhook',
['source', 'event_type'],
buckets=[0.01, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0]
)
# Gauges
webhook_queue_depth = Gauge(
'webhook_queue_depth',
'Current number of webhooks waiting to be processed',
['source']
)
स्वास्थ्य जांच समापन बिंदु
// NestJS health check example
@Controller('health')
export class HealthController {
@Get('webhooks')
async webhookHealth() {
const stats = await this.webhookService.getStats();
const healthy = stats.failureRate < 0.02
&& stats.queueDepth < 500
&& stats.avgProcessingTimeMs < 2000
&& stats.deadLetterCount < 10;
return {
status: healthy ? 'healthy' : 'degraded',
metrics: {
totalReceived24h: stats.totalReceived,
successRate: `${((1 - stats.failureRate) * 100).toFixed(2)}%`,
avgProcessingTimeMs: stats.avgProcessingTimeMs,
queueDepth: stats.queueDepth,
deadLetterCount: stats.deadLetterCount,
duplicateRate: `${(stats.duplicateRate * 100).toFixed(2)}%`,
lastReceivedAt: stats.lastReceivedAt,
},
};
}
}
7. सुरक्षा सर्वोत्तम प्रथाएँ
आईपी व्हाइटलिस्टिंग
# Nginx configuration for webhook endpoints
location /api/webhooks/stripe {
# Only allow Stripe's IP ranges
# https://stripe.com/docs/ips
allow 3.18.12.63;
allow 3.130.192.0/24;
allow 13.235.14.0/24;
allow 18.211.135.0/24;
allow 35.154.171.0/24;
deny all;
proxy_pass http://localhost:3001;
}
सत्यापन चेकलिस्ट का अनुरोध करें
- क्रिप्टोग्राफ़िक हस्ताक्षर सत्यापित करें (HMAC-SHA256)
- जांचें कि टाइमस्टैम्प सहनशीलता के भीतर है (5 मिनट)
- सामग्री-प्रकार शीर्षलेख को मान्य करें
- जांचें कि पेलोड का आकार सीमा के भीतर है (अस्वीकार करें> 1 एमबी)
- सत्यापित करें कि इवेंट प्रकार अपेक्षित है
- यदि प्रेषक श्रेणियां प्रकाशित करता है तो आईपी पता सत्यापित करें
- दर सीमा समापन बिंदु (दुरुपयोग को रोकें)
def validate_webhook_request(request):
"""Comprehensive webhook request validation."""
errors = []
# 1. Content-Type
if request.content_type != 'application/json':
errors.append(f'Invalid Content-Type: {request.content_type}')
# 2. Payload size (max 1MB)
if request.content_length and request.content_length > 1_048_576:
errors.append(f'Payload too large: {request.content_length} bytes')
# 3. Required headers
if not request.headers.get('X-Webhook-Signature'):
errors.append('Missing signature header')
# 4. Valid JSON
try:
payload = request.json
except Exception:
errors.append('Invalid JSON payload')
return errors
# 5. Required fields
if 'type' not in payload:
errors.append('Missing event type')
if 'id' not in payload:
errors.append('Missing event ID')
return errors
8. डिबगिंग चेकलिस्ट
जब कोई वेबहुक काम करना बंद कर दे, तो इस व्यवस्थित दृष्टिकोण का पालन करें:
- प्रेषक का डैशबोर्ड जांचें - अधिकांश प्लेटफ़ॉर्म (स्ट्राइप, शॉपिफाई, गिटहब) डिलीवरी प्रयास, प्रतिक्रिया कोड और टाइमस्टैम्प दिखाते हैं
- अपने सर्वर लॉग की जाँच करें - Nginx/Apache में वेबहुक एंडपॉइंट एक्सेस लॉग देखें
- एसएसएल प्रमाणपत्र सत्यापित करें - समाप्त प्रमाणपत्र नंबर एक मूक हत्यारा हैं
- कर्ल के साथ परीक्षण - एक अलग नेटवर्क से अपने एंडपॉइंट पर मैन्युअल रूप से पोस्ट करें
- DNS रिज़ॉल्यूशन जांचें — सुनिश्चित करें कि आपका डोमेन बाहरी नेटवर्क से सही ढंग से रिज़ॉल्यूशन करता है
- वेबहुक रहस्य को सत्यापित करें - प्रमुख परिवर्तनों या पर्यावरण प्रवास के दौरान रहस्य घूमते रहते हैं
- पेलोड प्रारूप परिवर्तनों की जाँच करें - एपीआई संस्करण अपडेट वेबहुक पेलोड को बदल सकते हैं
- हाल की तैनाती की समीक्षा करें - कोड परिवर्तनों ने हैंडलर को तोड़ दिया हो सकता है
- संसाधन सीमा की जाँच करें - मेमोरी, सीपीयू, डेटाबेस कनेक्शन
- पूर्ण प्रसंस्करण पाइपलाइन का परीक्षण करें - डेटाबेस लेखन, कतार प्रसंस्करण, साइड इफेक्ट्स को सत्यापित करें
अक्सर पूछे जाने वाले प्रश्न
मैं स्थानीय विकास में वेबहुक का परीक्षण कैसे करूं?
अपने स्थानीय सर्वर को इंटरनेट के संपर्क में लाने के लिए ngrok या इसी तरह के टनलिंग टूल का उपयोग करें। लोकलहोस्ट:3001 पर अग्रेषित सार्वजनिक यूआरएल प्राप्त करने के लिए 'एनग्रोक http 3001' चलाएँ। इस यूआरएल को प्रेषक के डैशबोर्ड में वेबहुक एंडपॉइंट के रूप में कॉन्फ़िगर करें। लोकलहोस्ट:4040 पर एनग्रोक वेब इंस्पेक्टर आपको हर अनुरोध का निरीक्षण करने और विफल डिलीवरी को दोबारा चलाने की सुविधा देता है। सीआई/सीडी के लिए, इसके बजाय मॉक सर्वर या रिकॉर्ड-रीप्ले पैटर्न का उपयोग करें।
मेरे वेबहुक एंडपॉइंट को क्या लौटाना चाहिए?
जितनी जल्दी हो सके 200 स्थिति कोड लौटाएं - 2-5 सेकंड के भीतर। प्रतिक्रिया निकाय को आम तौर पर प्रेषक द्वारा अनदेखा कर दिया जाता है, लेकिन {"status":"received"} जैसा सरल JSON अच्छा अभ्यास है। भले ही आप ईवेंट को एसिंक्रोनस रूप से संसाधित करने की योजना बना रहे हों, फिर भी 200 लौटाएँ। यदि हस्ताक्षर अमान्य है या पेलोड विकृत है तो केवल 4xx लौटाएँ। व्यावसायिक तर्क त्रुटियों के लिए कभी भी 5xx न लौटाएं - उन्हें लॉग करें और इसके बजाय पुनः प्रयास कतार में संसाधित करें।
मैं उन वेबहुक घटनाओं को कैसे संभाल सकता हूं जो क्रम से बाहर आती हैं?
पुनः प्रयास और नेटवर्क स्थितियों के कारण ईवेंट क्रम से बाहर हो सकते हैं। अपने हैंडलर में टाइमस्टैम्प या अनुक्रम संख्या जांच शामिल करें। स्ट्राइप के लिए, इवेंट के बनाए गए टाइमस्टैम्प का उपयोग करें। Shopify के लिए, update_at फ़ील्ड की जाँच करें। यदि कोई ईवेंट आता है जो ऐसी स्थिति को संदर्भित करता है जिसे आपके सिस्टम ने अभी तक नहीं देखा है, तो या तो इसे बाद में प्रसंस्करण के लिए कतारबद्ध करें या समाधान के लिए प्रेषक के एपीआई से वर्तमान स्थिति प्राप्त करें। इडेम्पोटेंसी कुंजियाँ ऑर्डर की परवाह किए बिना डुप्लिकेट प्रोसेसिंग को रोकती हैं।
वेबहुक विश्वसनीयता की निगरानी करने का सबसे अच्छा तरीका क्या है?
चार प्रमुख मेट्रिक्स को ट्रैक करें: डिलीवरी सफलता दर (लक्ष्य 99.5% से ऊपर), औसत प्रसंस्करण समय (लक्ष्य 500 मिलीसेकेंड से नीचे), कतार की गहराई (लक्ष्य 100 से नीचे), और मृत पत्र कतार का आकार (लक्ष्य शून्य)। जब कोई मीट्रिक अपनी सीमा पार कर जाए तो अलर्ट सेट करें। डैशबोर्ड के लिए ग्राफाना के साथ प्रोमेथियस का उपयोग करें, या डेटाडॉग या न्यू रेलिक जैसी प्रबंधित सेवा का उपयोग करें। डिलीवरी विफलताओं के लिए प्रेषक के वेबहुक डैशबोर्ड की भी निगरानी करें जो आप अपने लॉग में नहीं देख सकते हैं।
मैं वेबहुक रीप्ले हमलों को कैसे रोकूं?
तीन बचाव लागू करें: सबसे पहले, एक साझा रहस्य के साथ HMAC-SHA256 का उपयोग करके प्रत्येक अनुरोध पर क्रिप्टोग्राफ़िक हस्ताक्षर सत्यापित करें। दूसरा, हस्ताक्षरित पेलोड में टाइमस्टैम्प की जांच करें और 5 मिनट से अधिक पुरानी घटनाओं को अस्वीकार करें (स्ट्राइप ने इसे अपनी हस्ताक्षर योजना में शामिल किया है)। तीसरा, यह सुनिश्चित करने के लिए कि प्रत्येक घटना को ठीक एक बार संसाधित किया जाता है, idempotency कुंजियों का उपयोग करें, भले ही कोई हमलावर टाइमस्टैम्प विंडो के भीतर एक वैध हस्ताक्षरित अनुरोध को दोबारा चलाता हो।
अगले कदम
वेबहुक विश्वसनीयता इवेंट-संचालित एकीकरण की नींव है। इस गाइड में पैटर्न - हस्ताक्षर सत्यापन, इडेम्पोटेंट प्रोसेसिंग, एसिंक कतार, संरचित निगरानी - इस पर ध्यान दिए बिना लागू होते हैं कि आप किस प्लेटफ़ॉर्म को एकीकृत कर रहे हैं।
संबंधित संसाधन:
- ओडू रेस्ट एपीआई ट्यूटोरियल - ओडू के साथ एपीआई एकीकरण
- ECOSIRE मार्केटप्लेस कनेक्टर्स - पूर्व-निर्मित ओडू एकीकरण
- ई-कॉमर्स 2026 के लिए सर्वश्रेष्ठ ईआरपी - एकीकरण-तैयार ईआरपी तुलना
ECOSIRE उत्पादन-ग्रेड वेबहुक एकीकरण बनाता है जो Odoo, Shopify, Stripe और दर्जनों अन्य प्लेटफार्मों को जोड़ता है। हमारी एकीकरण सेवाओं में डैशबोर्ड की निगरानी, डेड लेटर क्यू हैंडलिंग और 99.9% डिलीवरी गारंटी शामिल हैं। हमारे एकीकरण इंजीनियरों से बात करें।
लेखक
ECOSIRE TeamTechnical Writing
The ECOSIRE technical writing team covers Odoo ERP, Shopify eCommerce, AI agents, Power BI analytics, GoHighLevel automation, and enterprise software best practices. Our guides help businesses make informed technology decisions.
ECOSIRE
ECOSIRE के साथ अपना व्यवसाय बढ़ाएं
ईआरपी, ईकॉमर्स, एआई, एनालिटिक्स और ऑटोमेशन में एंटरप्राइज समाधान।
संबंधित लेख
eMAG Odoo Integration: Connect Romania's Largest Marketplace to Your ERP (Orders, Stock, e-Factura)
Connect eMAG Marketplace to Odoo ERP: offer and order sync, AWB shipping, returns, stock and price updates, plus Romanian e-Factura compliance for sellers.
Shopify-Odoo Deep Integration 2026: Inventory, Orders, Accounting Sync
Architect a production Shopify-Odoo connector: bi-directional inventory, order sync, accounting integration, multi-warehouse, returns, idempotent processing.
Shopify Webhooks 2026: HMAC, Retries, Idempotency in Production
Build reliable Shopify webhook receivers: HMAC verification, retry strategies, idempotency, dead-letter queues, and at-least-once processing patterns.
Performance & Scalability से और अधिक
Shopify Speed Optimization: A Technical Checklist That Actually Moves Core Web Vitals (2026)
A field-tested Shopify speed checklist for 2026 — what actually improves LCP, INP, and CLS on real stores, what wastes time, and how to audit apps and themes.
Technical SEO Audit Checklist 2026: 47 Checks We Run on Every Client Site
The 47-point technical SEO audit checklist we run on every client site in 2026 — crawlability, indexation, canonicals, hreflang, Core Web Vitals, and logs.
Odoo 19 HR: Skills Matrix, Career Plans, Performance Cycles
Odoo 19 HR upgrade: native skills matrix, career path planning, performance review cycles, 9-box grid, succession planning, HRIS integration.
Odoo 19 Performance Benchmarks: PostgreSQL 17 Tuning Numbers
Real-world Odoo 19 performance benchmarks: web client speed, ORM throughput, PG17 tuning settings, connection pooling, worker counts, scaling thresholds.
OpenClaw Cost Optimization and Token Efficiency at Scale
OpenClaw token cost optimization: prompt caching, model routing, response caching, batch APIs, and per-tenant cost guardrails for production agents.
Power BI Incremental Refresh for Tables Over 10 Million Rows
Power BI Incremental Refresh playbook for 10M+ row tables: partition design, RangeStart/RangeEnd, refresh policies, query folding, and DirectQuery hybrids.