this post was submitted on 12 Aug 2024
550 points (96.8% liked)
Comic Strips
12643 readers
3894 users here now
Comic Strips is a community for those who love comic stories.
The rules are simple:
- The post can be a single image, an image gallery, or a link to a specific comic hosted on another site (the author's website, for instance).
- The comic must be a complete story.
- If it is an external link, it must be to a specific story, not to the root of the site.
- You may post comics from others or your own.
- If you are posting a comic of your own, a maximum of one per week is allowed (I know, your comics are great, but this rule helps avoid spam).
- The comic can be in any language, but if it's not in English, OP must include an English translation in the post's 'body' field (note: you don't need to select a specific language when posting a comic).
- Politeness.
- Adult content is not allowed. This community aims to be fun for people of all ages.
Web of links
- !linuxmemes@lemmy.world: "I use Arch btw"
- !memes@lemmy.world: memes (you don't say!)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Alright who's running the database on the same machine as the server...π
If you can do this, do it. It's a huge boost to performance thanks to infinitely lower latency.
And infinitely lower reliability because you can't have failovers (well you can, but people that run everything in the same host, won't). It's fine for something non critical, but I wouldn't do it with anything that pays the bills.
I work for a company that has operated like this for 20 years. The system goes down sometimes, but we can fix it in less than an hour. At worst the users get a longer coffee break.
A single click in the software can often generate 500 SQL queries, so if you go from 0.05 ms to 1 ms latency you add half a second to clicks in the UI and that would piss our users off.
Definitely not saying this is the best way to operate at all times. But SQL has a huge problem with false dependencies between queries and API:s that make it very difficult to pipeline queries, so my experience has been that I/O-bound applications easily become extremely sensitive to latency.
Iβm going to guess quite a people here work on businesses where βsometimes breaks, but fixed in less than an hourβ isnβt good enough for reliability.
Yeah if you need even 99.9% uptime, the most downtime you can accept in a year is eight hours.
Most businesses dont require that kind of uptime though. If i killed or servers for a couple of hours between 02:00 and 04:00 every night probably nobody would notice for at least a year if it wasn't for the alerts we'd get.
Those queries don't all have to be executed sequentially though, do they? Usually if you have that many queries, at least some of them are completely independent of the others and thus can execute concurrently.
You don't even need threading for that, just non-blocking IO and ideally an event loop.
The catch is that they all need to run in the same transaction to be unaffected by other things going on in the database and to make updates atomic. A single transaction means a single connection, and ODBC/JDBC has no way of multiplexing or pipelining queries over a single connection.
It's probably theoretically possible to run some things in different transactions. But with all the different layers and complexity of the code (including third party components and ORMs like Hibernate), understanding all the failure modes and possible concurrency issues becomes intractable.
Good enough for WordPress.
Most beginner selfhosters.
and most every cpanel (and every other web host panel) box on the planet.
web, ftp, database, mail, dns, and more. all on one machine.
Most sites hosted on cPanel are relatively small and never need to horizontally scale. People running apps large enough to require multiple servers usually try to optimize their environment by reducing overhead (and cPanel adds quite a bit of it) and tend to not need a GUI for server admin.
For distributed that feed back to a centralized DB? Me. All the dang time.
I'm not that brave doing development by connecting to Production database