3 ms·
Ever heard of speed of light? If you really think that "just connect to the same db" was an easy solution to the problem you describe in the general sense then
by jupp0r 2y ago
Ever heard of speed of light? If you really think that "just connect to the same db" was an easy solution to the problem you describe in the general sense then you haven't done so in a moderately complex system yet. It can be a good solution for a very limited set of circumstances, but that's about it.
- andrewmcwatters 2y agoIt’s bullshit. A majority of high volume systems can do this just fine. This is just engineering wank. Standard solution is query a session table on from a single location, and once you actually start to need to trim request time, it’s not even the first place you look.
- jupp0r 2y agoAssumptions you are making: * everything is located physically close together (good luck reading from a DB table in Singapore from a service in Europe for every request) * you have few enough client services that want to do this that the number of db connections does not become a problem (this is 100 by default for Postgres, you might need to tune this or deploy proxies, etc) * high availability is already taken care of (you don't want that one DB server to bring down everything in case of a failure)