W
W
willfin2016-10-20 16:35:15
System administration
willfin, 2016-10-20 16:35:15

How to organize a dedicated production / production server for several projects?

Hey!
The web project is developing and VPS has become frankly missed. Therefore, it was decided to start moving to a dedicated server.
And so, there is only one dedicated server so far, and it is planned to host a web service and 2 more smaller developing web projects on it. By the way, all of them are not connected with each other and have separate databases.
Previously, the Bitrix environment on Centos was spinning on the VPS (I paid attention to it because I use tsmsk from the same Bitrix). Sometimes it made itself felt, mainly due to crooked updates.

  • Is it worth it to stay on this package from Bitrix already on a real server, and if you switch (most likely), then to what? nginx/mysql/php

Since there will be several projects in production , I wanted to separate them into virtual machines or containers.
  • What is your opinion, which technology and software suite is better and more practical to use in this situation? What do you use in your projects?
  • If you share something within the same physical machine, do you separate entire projects or, for example, a separate container with ngnix, a separate subd, etc.?
  • How do you monitor the status and load, and how do you manage your zoo?
  • Is Docker suitable for this or is it more of a developer tool? I would like to have a convenient deployment system.

And finally, protecting data from loss in case of technical problems (like a disk failure). The task of 100+% uptime is not so important now.
  • How did you organize backups or data mirroring?

I would like something not cumbersome, but simple and relatively flexible. I would be very grateful if you share your experience and useful links. If there are important details that I did not touch on, it would also be great if you mention them.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Papa, 2016-10-20
@willfin

In your case (1 dedicated server) you do not need virtualization and, moreover, Docker (it is intended for other purposes).
Install nginx + php-fpm, set up upstreams in nginx and pools in php-fpm for each project based on your needs.
For convenient deployment of applications, including those written in php, there are a lot of tools (for example , deployer.org/). Or Jenkins, if you know how to "cook" it. With it, you can also organize CI.
To prevent data loss (in the context of the database) - this is replication + regular backups. But there is one point - at least one more separate physical slave node is needed for replication. Making simple backups without replication is a guaranteed loss of data in the event of a hardware failure. For a good database, it’s better to move it to separate nodes, if possible. With this approach, it is desirable that your service provider has an internal network within the data center of at least 1 Gbps.
Something like this. As practice shows, this is quite enough for projects with a low load.

D
Dmitry Belyaev, 2016-10-20
@bingo347

I would advise docker for your situation, the more time it is mentioned in your question, I think you know how to work with it
nginx container 1 common with forwarding all containers with php-fpm into it
But for the database, if the RAM allows, I would do that database each project in its own container

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question