Re:Ask HN: Real-world anecdotes of MySQL at scale?
by unoti on Wednesday September 28, 2022 @05:28PM
(#33013514)
Suppose there are several different major components of a large system that need to know something about an important entity like a user for example. A good way to share that information is to have a user service that answers those questions (in a larger system) or a user library/data provider that does this (in a smaller system). A worse way to do that is to have sql queries that different systems use to get that data.
Re:Ask HN: Real-world anecdotes of MySQL at scale?
by phendrenad2 on Thursday September 29, 2022 @02:36PM
(#33025176)
Isn't shared queries faster though?
Re:Ask HN: Real-world anecdotes of MySQL at scale?
by unoti on Saturday October 01, 2022 @09:40AM
(#33046512)
It’s one less layer, so yes. But going thru a service gives you the opportunity to use caching, cache invalidation, or switch the operation to different kind of data store. So potentially it can be faster sometimes. Also if the database is occasionally burning up from being overworked then survival and reliability are much more important than speed.
Re:Ask HN: Real-world anecdotes of MySQL at scale?
by phendrenad2 on Thursday October 13, 2022 @02:05AM
(#33187795)
A service layer is also a single point of failure. So if uptime is a concern, one less component that a developer can accidentally take out and bring down the whole system is valuable.
One of the most pernicious dangers in shipping a successful project is you paradoxically both cargo cult and critique random parts of your success. Looking back, you might decide that choice A was correct, while choice B was incorrect. But you don't have the benefit of having tried all of those other options. So don't trust postmortems too much, they are single data points in a sea of failures. They could very well be random chance.
noob question but what do “sharing queries” and “sharing service calls” mean?