Overview
This project details the modernization of registration intake pipelines handling concurrent transactions during sudden, high-profile event registration launches.
Problem
The existing framework suffered from lock contentions in the database layer when thousands of endpoints attempted to verify remaining event ticket allotments and process gateway payment authorizations simultaneously.
Solution
We isolated ingestion layers entirely, leveraging Cloudflare Workers at the edge to throttle traffic and drop invalid request formats, dropping clean transactional structures into an isolated queue managed via Python microservices.
Outcome
- Zero Failure Outages: Successfully sustained an opening payload surge of 12,000 requests/minute.
- Payment Accuracy: Completed payment confirmations cleanly via transactional idempotency layers without duplicate charges.
Stack
- Python, Django ORM, Redis Sentinel, PostgreSQL, Stripe Core API, Cloudflare Workers.
Role
- Lead systems architect responsible for edge pipeline rules, queue isolation models, and safe database locks.
Engineering Insights
When optimizing Python backend pipelines for production safety, we decoupled heavy task execution from request/response threads using memory buffers:
# Ensuring transactional safety via atomic locks
from django.db import transaction
def append_registration_safely(payload_data):
with transaction.atomic():
slot = EventSlot.objects.select_for_update().get(id=payload_data.slot_id)
if slot.has_vacancy():
slot.reserve()
return create_ledger_record(payload_data)
raise CapacityExceededException()