Question

I have been making some research in the domain of servers for a website I want to launch. I thought of a certain configuration of a server with RAID 10 implemented with a NAS doing the backup which has a RAID 10 configuration as well. This should keep data safe in 99.99+ of cases.

My problem appeared when I thought about the need of a second server. If I shall ever require more processing power and thus more storage for users, how can I connect a second server to my primary one and make them act as one what the database (mySQL) is regarded?

I mean, I don't want to replicate my first DB on the second server and load-balance the request - I want to use just one DB (maybe external) and let the servers use it both at the same time. Is this possible? And is the option of backing up mySQL data on a NAS viable?

Était-ce utile?

La solution

The most common configuration (once scaling up from a single box) is to put the database on its own server. In many web applications, the database is the bottleneck (rather than the web server); so the first hardware scale-up step tends to be to put the DB on its own server.

This also allows you to put additional security between the database and web server - firewalls are common; different user accounts etc. are pretty much standard.

You can then add web servers to the load balancer, all talking to the same database, as long as your database can keep up.

Having more than one web server also helps with resilience - you can have a catastrophic hardware event on one webserver and the load balancer will direct the traffic to the remaining machines.

Scaling the database server performance is a whole different story - though typically you use very beefy machines for the database, and relative lightweights for the web servers.

To add resilience to the database layer, you can introduce clustering - this is a fairly complex thing to keep running, but protects you against catastrophic failure of a single machine.

Yes, you can back up MySQL to a NAS.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top