Use of design patterns
Do we use design patterns in the backend excessively in good companies like Phonepe, flipkart, Myntra, Amazon ... Or do we focus on readability of the code vs the performance of the code.
Just curious if we have to design some sort of flash sale. For example: let's say 100 iPhones at discounted price for window or may be booking tatkal on irctc.
Will it be good Design to serve the read from the replicas and during the payments may be queue the requests, throttle and add let the db process sequential?
The replicas won’t be good as they have an eventual consistency. So what we can do is use Cache prolly Redis or Aerospike with Optimistic or Pessimistic Locking so it can power the transactions and Locking would make sure only one checkout happens successfully at a time.
Too much contention. Locking is not the right approach. Replicas cause no one cares what is shown. The real stuff is your checkout. That should throttle request. Probably that's why irctc gets stuck everytime while we move to the next step.
Also we just need to ensure the eventual of consistency is not uncertain. So yes may be an asynchronous update on the cache too. Or may be quorum based reads.
Do we use design patterns in the backend excessively in good companies like Phonepe, flipkart, Myntra, Amazon ... Or do we focus on readability of the code vs the performance of the code.
like ordering food at a discount or free food n number of times?
Also, do yall put in extra hours/work on weekends in office during peak seasons(christmas, new year)?
Going through the job posting I've seen this sentence pop up in the requirements multiple times: "Have delivered, extended, and maintained large scale distributed systems." I'm having a hard time understanding what this means in a job co...
We seldom get asked this question about how do we ensure a highly efficient and robust platform/system that can cater to large number of hits.
Well, Bookmyshow's server was down for the starting 4 mins with a 504. How could they have im...