3 ms·
1) Orders are complex and require many steps to process correctly. 2) Orders are only the writes, we have to serve many magnitudes more read traffic and not al
by quadrature 3y ago
1) Orders are complex and require many steps to process correctly.
2) Orders are only the writes, we have to serve many magnitudes more read traffic and not all of it is cached (invalidations, inventory counts).
- ndriscoll 3y ago1. Yes, of course. 2. How many is "many" magnitudes? The word suggests at least 4, but if so, it'd make more sense to brag about that. And anything is cacheable if it doesn't affect transactional logic. If the user is looking at a page for 10 seconds, are they going to care that the inventory count is 3 seconds old? At your many orders of magnitude, caching for a couple seconds would give you hits almost all of the time for popular pages. Also, aren't inventory counts that are displayed to users typically completely made up? Why would you make something like that dynamic and accurate in a high load system? The only reason to have it is to create FOMO or for b2b bulk ordering, and the latter is a whole different thing.