Set up cluster
I need a dog and a virgin.
As a cluster.
The Virgin is like a server.
There are three sandbox series:
1 of 64.1A1 – Master
1 of 64.1B1 – slave
1 of 64.1c1 – common database (mysql)
When entering the site, the client gets to the master or slave server.The database is shared on a third server.Synchronization between the master and slave servers is two-sided (master slave), if you change the file on the master server, then it will fall on the slave, and vice versa.To synchronize the files appears to be using the rsync program.The problem in the current settings of the web cluster is the synchronization of files between the master and slave servers.- the first problem, the client entered the master server and updated the system core that is in the /bitrix catalog.As a result of these actions when a bilateral file synchronization worked, the slave server to the master recorded the old files that were to be updated.As a result, we received a wrong upgrade core of the system, in which a part of the files was stolen.- The second problem, when developers work on the master server (create/edit files), then the problem occurs, from the slave server synchronization works and all changes are drawn away.You have to enter the file changes several times so that they are on two servers.The third problem is that the automatic file on the server does not work.When we download the updated files to the server, they are immediately drawn up with the old files.Files from the slave server draw new files on the master server.- what additional to set up and what solution we see (this may not be correct, that we will address) To solve the problem with file synchronization, we found the following solution:
- You need to set the unilateral synchronization of the master -> slave files (so that it works only on one side).But from synchronization you need to disable the catalogues /home/bitrix/www/bitrix/managed_cache, /home/bitrix/www/bitrix/cache, /home/bitrix/www/bitrix/backup.- For the file storage, a new separate server has been created, it needs to be transferred to the /home/bitrix/www/upload catalog, there are stored the work files of the portal (photos, documents, etc.).)On the master and slave servers you need to make the upload catalogue connected to that server, but physically all the files must be on the fourth new server.To make that from the given IP address users enter only to the master server.Or for the master server to make a separate address so that it could be logged in.This is necessary, for example, for the upgrade of the system.
- як зараз воно налаштоване
Описую як налаштований веб-кластер на sandbox(DEV). (Робочий кластер(PROD) налаштований таксамо, але там інші сервера)
У нас є три серери sandbox:
100.64.1.**a1 - master
100.64.1.** b1- slave
100.64.1.** c1- спільна база даних (mysql)
При вході на сайт клієнт попадає на сервер master або slave. База даних там спільна, знаходиться на третьому сервері.
Синхронізація між серверами master та slave налаштована двохстороння (master <-> slave), якщо змінити файл на сервері master, то він потрапить на slave, і навпаки.
Для синхронізації файлів здається використовують програму rsync.
- в чому проблема поточного налаштування
Проблема в поточному налаштуванні веб кластера полягає в синхронізації файлів між серверами master та slave.
- перша проблема, замовник зайшов на сервер master та оновив ядро системи яке знаходиться у каталозі /bitrix. В результаті цих дій коли відпрацювала двостороння синхронізація файлів, із сервера slave на master записались старі файли, які мали бути оновленні. В результаті ми отримали не правильно оновлене ядро системи, у якому була затерта частина файлів.
- друга проблема, коли розробники працюють на сервері master (створюють/редагують файли), то виникає проблема, із сервера slave спрацьовує синхронізація і затирає усі зміни. Доводиться вносити у файл зміни декілька разів, щоб вони були на двох серверах.
- Третя проблема, не працює автодеплой файлів на сервер. Коли завантажуємо оновлені файли на сервер, вони одразу затираються старими файлами. Файли із сервера slave затирають нові файли на сервері master.
- що треба додатково налаштувати і яке рішення ми бачимо(воно може бути не правильним, того і звертаємося)
Щоб вирішити проблему із синхронізацією файлів, ми знайшли таке рішення:
- Потрібно налаштувати односторонню синхронізацію файлів master -> slave (щоб вона працювала лише в одну сторону). Але із синхронізації потрібно відключити каталоги /home/bitrix/www/bitrix/managed_cache, /home/bitrix/www/bitrix/cache, /home/bitrix/www/bitrix/backup.
- Для файлового сховища створили новий окремий сервер, на нього потрібно перенести каталог /home/bitrix/www/upload, там зберігаються робочі файли порталу (картинки, документи та ін.). На серверах master та slave потрібно зробити, щоб каталог upload був під'єднаний з даного сервера, але фізично усі файли мають знаходитись на четвертому новому сервері.
- зробити, щоб із заданих ip адрес користувачі заходили лише на сервер master. Або для сервера master зробити окрему адресу, щоб на нього можна було заходити. Це потрібно, наприклад для оновлення системи.
Current freelance projects in the category DevOps
Setting up a backup system and optimizing server infrastructureObjective of the work: Ensure reliable data storage for the CRM system and application by implementing an automated backup system, as well as carry out a series of server improvements to enhance the stability, security, and performance of the infrastructure. DevOps, Databases & SQL ∙ 4 days 4 hours back ∙ 26 proposals |
Deployment of a Ruby on Rails project on VPS + Inbound Email RoutingNeed help deploying a platform for automating requests for public information (based on the open-source engine Alaveteli). The project works as a mail router: it generates unique email addresses for each request, sends them to government agencies, and receives responses back to… DevOps, Linux & Unix ∙ 10 days 7 hours back ∙ 11 proposals |
Residential Proxy Infrastructure EngineerWe're building a residential proxy network from scratch — fully owned, no third-party suppliers. We need one exceptional network engineer to build the entire technical foundation. What you'll build: - Android background SDK that routes proxy traffic through user devices… C & C++, DevOps ∙ 12 days 9 hours back ∙ 15 proposals |