GOAT EngineerPreparing your learning space…

Practice problems · Topic

Concurrency control problems

Covers optimistic and pessimistic locking, reservations, holds with a TTL.

Concurrency control problems are about requests that race for the same thing at the same moment. Reading a count and then writing it is two steps with a gap between them, so the check and the change have to happen together, with locks, an atomic increment or a hold that expires.

Problems that need concurrency control

  1. Rate Limiting Across Multiple Servers

    Hold each client to its limit when its calls land on many servers, so only the noisy client suffers. Practise token buckets and failing open or shut.

  2. Ticket Holds That Expire: Practice Problem

    Hold a ticket while the buyer pays and release it when they walk away, without selling one twice while a store is down. Practise atomic claims.

By GOAT Engineer. Practice problems · Privacy Policy · Contact.