Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a central database server for many sites: plausible?

Basically, I need some parts of database data synchronized on up to several dozens of sites. The perfect solution would be creating a central server to host that data.

Each pageload will have to fetch data from both database servers - the local and remote one and writes to the remote server will be quite common too.

While the db server can be as fast as desired hardware-wise, I'm cautious of the bottlenecks:

  • Multiple database connections must be established on each pageload.
  • Latency of the signal traveling between two physical locations.

Am I right to worry? Would it be wiser to synch the databases with cronjobs or other technologies?


Along with assigning a bounty, I'm adding to the question hoping an expert with real life experience of this comes along:

What other technologies are there (besides cron) to sync MySql databases?

like image 328
raveren Avatar asked Jan 28 '11 18:01

raveren


People also ask

Can multiple websites use the same database?

They can quite happily use the same database. Depending on the RDBMS you are using, you may want to create an additional Database or user instance for each site. With SQL Server you can create an additional database, or you can add a schema for each site. for Oracle you can create a user specific to each site.

In which database data can be accessed from multiple website with the use of network?

Web Database Definition A web database is essentially a database that can be accessed from a local network or the internet instead of one that has its data stored on a desktop or its attached storage.

What is the meaning of central database?

A centralized database (sometimes abbreviated CDB) is a database that is located, stored, and maintained in a single location. This location is most often a central computer or database system, for example a desktop or server CPU, or a mainframe computer.


1 Answers

This questions is really down to your situation and I believe you've identified the main two problems with the central DB solution - so yes, you are right to be concerned.

I would personally opt to sync the data to the servers using a cron (or whatever method you chose) - cutting down on hardware costs and page load times. This to me is the more technical solution but in terms of its benefits (faster page loading times, no dependency on the central DB, lower costs) is the correct solution.

Alternatively, you could always set up a small MySQL database on a remote server and create a few test websites and run some benchmarks, this would give you some data on whether you are happy with the loading times.

like image 119
Prisoner Avatar answered Nov 07 '22 11:11

Prisoner