Food,Code and Cloud Computing. You can support here :https://www.buymeacoffee.com/anishansari
Markdown supported · ⌘↵ to post
The two lane sync idea is the part I will remember from this drill. Sending price and stock through a high priority queue while bulk imports wait in their own low priority lane explains the stale price example clearly. A search result at NPR 1,200 that is really NPR 1,350 at checkout is exactly the kind of bug that erodes trust. I also liked the typeahead math. Doing the heavy counting hourly and leaving each keystroke as one Redis GET makes the 50 to 100 ms budget feel achievable instead of aspirational.
QRiQRa Team
Treating the index as a slightly stale copy, with MySQL deciding price and stock at checkout, answers the first question well. Search can be a little behind, but the order cannot. Keeping price and stock updates on their own path, apart from bulk imports, also seems like the right call. One small addition to the outage plan: if results come from cache or FULLTEXT, the "search is limited" notice could also say whether prices shown might be out of date. That way a user is not surprised when checkout shows a different number.