Concurrency issues - distributed system
Hey, needing some advice or pointers with a work based question that is getting heated 😂
How can we update a customer account where 1000s of orders are coming in at the same time, this needs to be as real-time as possible, we are currently seeing up to 30 seconds of DB blocking in some cases 😖
6 Replies
depends what you want to update
Dumb question, but I assume you've already added a shedload of resources to the database server(s)?
What kind of setup do you already have?
Have you read Designing Data Intensive Applications?
https://www.amazon.com/Designing-Data-Intensive-Applications-Reliable-Maintainable/dp/B08VL1BLHB/
Have you sharded your db?
multiple services, using a message bus
Yeah the database server has abundance of resources it's not running out of resources but just locking records. One of the issues we've highlighted is that there are triggers on a few tables which upon occuring updates a customers account, along with manual updates and normal order completion route 😖
Might be a good idea to remove the triggers and consolidate the business rules in the application