Answer the question
In order to leave comments, you need to log in
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
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.
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.
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).
у меня на одном железе 4 вирт сервера. один из них строго сервер БД. так что-да, стоит выносить
безопасность это никак не повысит это раз
выносить бд надо если основной сервер не справляется и вы решили масштабироваться и это самый простой первый шаг
все ваши мысли не верны.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question