Should you go with an Optimistic or Pessimistic Concurrency Control Database?

The Backend Engineering Show with Hussein Nasser

Episode | Podcast

Date: Thu, 01 Jul 2021 21:00:00 GMT

<p>MongoDB, Postgres, Microsoft SQL Server, or MySQL, or any other database manages concurrency control differently. There are two methods, pessimistic and optimistic, both have their pros and cons. Let explore how different databases implement this and what is the effect on performance/scalability.</p> <p>This is often known as Optimistic vs pessimistic locking. Although I don't really like to use locking with this because it confuses the story.</p> <p>0:00 Intro</p> <p>2:20 What is Concurrency Control</p> <p>6:00 Pessimistic Concurrency Control</p> <p>14:50 Optimistic Concurrency Control</p> <p><br /></p> <p>Resources</p> <p>https://www.postgresql.org/docs/13/mvcc.html</p> <p>http://source.wiredtiger.com/develop/architecture.html</p> <p>https://docs.microsoft.com/en-us/troubleshoot/sql/performance/resolve-blocking-problems-caused-lock-escalation</p> <p><br /></p> <p>Become a Member on YouTube</p> <p>https://www.youtube.com/channel/UC_ML5xP23TOWKUcc-oAE_Eg/join</p> <p><br /></p> <p>🔥 Members Only Content</p> <p>https://www.youtube.com/playlist?list=UUMO_ML5xP23TOWKUcc-oAE_Eg</p> <p><br /></p> <p>Support my work on PayPal</p> <p>https://bit.ly/33ENps4</p> <p><br /></p> <p>🧑‍🏫 Courses I Teach</p> <p>https://husseinnasser.com/courses&nbsp;</p>