Production Schema Step 8: Make It Safe Under Load

Find the place in your application where two simultaneous requests could produce a state that should be impossible: a capacity exceeded, a duplicate created, a balance going negative. Write the constraint that makes it impossible at the database level, and handle the resulting error properly in the application. Then prove it: run the same request twice concurrently and confirm exactly one succeeds. Finally, audit your transactions for anything slow held inside one.

SANKOFA SANDBOX
loading editor…
Your turn → Work through it step by step. This is a piece of the course project, not a throwaway exercise.

Built it in both languages?

Mark it done once your Python and JavaScript versions both run correctly. Honesty here is what makes the dashboard useful to you.

← BackNext: Module 9: Running a Database →