I know all the cloud big names e.g. aws/azure provide managed SQL or noSQL service so that their VM user can access the database with relatively low latency although they are not necessarily be running on the exact same machine (but at least there is option we can host in the same data centre). But how are those DigitalOcean/Linode users hosting their database? it is possible we can run mysql etc the VM directly (i.e. we manage them ourselves) but their VM instances probably wont always be powerful enough to host a database? or we are typically running a lot of replicated instances to balance the load? cheers
There's nothing magical about hosting a database. For a small application or early in the process, you can host in on the same machine; you can move it to a dedicated machine if the load is too much for one node to handle. IMO it's much better to do this than to assume a-priori that you need bunches of machines and wind up paying for lots more infrastructure than you actually need. Try it and see.