
Senior Django Developer Needed for API Endpoint Optimization
Upwork
Remoto
•6 hours ago
•No application
About
We are seeking a senior Django backend developer to resolve a tricky intermittent bug in our REST API. The issue occurs under high traffic and leads to duplicate records being created in the database, even though we have unique constraints. The Specific Bug: Our app uses Django 4.x with Django REST Framework and PostgreSQL. Endpoint /api/orders/create/ sometimes creates duplicate Order records when multiple requests for the same order arrive almost simultaneously. The database has a unique constraint on order_number, but race conditions in the view logic are causing IntegrityErrors or duplicate entries. Attempts to fix it using get_or_create() or transaction atomic blocks have partially mitigated the issue but do not fully prevent duplicates under high concurrency.