V
V
Vadim Bakhtin2016-06-17 12:22:52
MySQL
Vadim Bakhtin, 2016-06-17 12:22:52

Is it worth moving the database to another server?

Hello, there are 2 servers, both are medium 2core x 7gb, there are two options. Just deploy a couple of sites on one server, nginx + php + mysql, or the second option is to move mysql to another server.
I don’t know if it’s worth doing this, maybe it will only make it worse, there is no delay between servers, they are in the same DC, but still I don’t know how fast a database that is not on localhost will work.
If I take out a DB on other server it will work, most likely, even more conveniently. And this will greatly increase security, as it seems to me.
What do you say?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
L
landergate, 2016-06-17
@from2003

There is simply no need to do so. Especially in the story about "a couple of sites".
This process, in general, does not affect security at all .
The physical separation of the database from the application is usually necessary for some specific functional reason.

N
nikolayvaganov, 2016-06-17
@nikolayvaganov

must come from the load. If one server holds the load, then you should not take it out. unix socket is faster than tcp connect.

O
Oleg Bukatchuk, 2016-06-17
@olegbukatchuk

The security that you mentioned must be observed in any case, even if everything is running on one server. I would implement it like this.
The 1st server was left with the site databases, and the 2nd one was implemented for backups (or for replication of your databases: master/slave). That will be more reliable. Understand that until you have 100K visitors per day on your site, this will only slow down the loading of sites (delivery of content).

A
Alexander Chernykh, 2016-06-17
@sashkets

у меня на одном железе 4 вирт сервера. один из них строго сервер БД. так что-да, стоит выносить

Николай Бараненко, 2016-06-17
@drno-reg

думаю стоит вынести БД на другой сервер.

Пума Тайланд, 2016-06-17
@opium

безопасность это никак не повысит это раз
выносить бд надо если основной сервер не справляется и вы решили масштабироваться и это самый простой первый шаг
все ваши мысли не верны.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question