How We Built r/Place
> We actually had a race condition here that allowed users to place multiple tiles at once. There was no locking around the steps 1-3 so simultaneous tile draw attempts could all pass the check at step 1 and then draw multiple tiles at step 2.<p>This is why you use a proper database.<p>I'd probably add a Postgres table to record all user activity, and use that to lock out users for 5 minutes as an initial filter.  Have triggers on updates to then feed the rest of the application.