![]() Perform 2-4 steps of Apply File Synchronization block in order to run internal process for setting synchronization.Data & File backup is a major requirement for end-users, There are many cloud-based commercial services which provide cloud storage allowing users to backup their data with simple easy tools: File Synchronization clients. ![]() Add extra servers and Apply the changes.ģ. Click Change environment topology for the environment with your application.Ģ. If you change the environment topology by adding more app servers, you need to initiate the script again in order to keep the synchronization process on all nodes.ġ. As a result, the synchronization will be automatically performed every time you add or change anything in your WordPress (or any other application). In a moment, check the webroot > ROOT > wp-content folder on all app servers.Īs you can see, the previously uploaded image is located in the uploads folder on each node. Initially, you will see that on both server nodes lsyncd folder, install.sh and replication.tar files appear in the webroot directory.ĥ. Wait a short time (about 2 mins) for the settings to be applied. Note: do not select the whole webroot folder because this will disable the synchronization4. Navigate to the webroot > ROOT > wp-content folder.Īt one of the app servers you will see a newly added uploads folder that contains your newly added files. Return to the Jelastic dashboard and click Config next to your server node.ģ. In our case we uploaded one image to the Media Library.Ģ. Go to the admin panel and make your custom changes: upload images or files, edit the themes etc. Let’s check the file upload processing by the servers, without synchronization enabled.ġ. Complete the WordPress installation by providing the required information. Click Open in browser for your environment.Ĥ. And, you can use a more complex scenario by setting the clustered solution with your WordPress application.ģ. In our case, we have simply added one more app server to the environment. Now let’s create a cluster, to increase the number of app servers.īy using instructions in our documentation, you can easily add extra app servers, enable high availability or even configure a clustered solution: The instruction and the widget can be found in the WordPress document.Ģ. ![]() You can install your WordPress application manually or using our JPS widget for one click installation. This instruction is also fully appropriate for other PHP, Java or Ruby applications such as Drupal, Joomla, Liferay, Redmine and others. In our example we will use the WordPress application deployed to the environment with two servers. So now let’s see how to turn this into reality, step-by-step. This robust and efficient solution makes the file synchronization system as simple as possible. As a result, when a change is made in the chosen folders on any of the app servers, those changes will be synced to each server node automatically. Before its installation, you will be asked to choose the folders you want to synchronize. With a help of our bookmarklet, lsyncd is automatically installed on each app server available in the environment. ![]() In such a way, the load on CPU is decreased and you do not burn up many resources on processing the synchronization. Being wisely coupled with inotify, lsyncd initiates file sync only if it has detected any actual changes in the system. Lsyncd is a light-weight, live mirror solution used to synchronize app servers. Basically, server side script is used with a help of such a utility as lsyncd together with cron. In the future, our team will integrate it into the core system after we process feedback on this functionality.The current solution is a combination of bookmarklet and server side script. In today’s post, we want to address the issue of keeping uploaded files in sync or, in other words, we will provide solution for the file synchronization problem.įor now this is just a workaround which helps to automate content synchronization on multiple app servers. The rest of the servers will fall out-of-sync. In other words, only the server which was processing the file upload request will contain newly added content. The main problem is that these applications by default save all uploaded files only to one server and do not synchronize these files between server nodes in the cluster. Of course, it is more difficult to run such applications as WordPress, Drupal, Joomla, Liferay, Redmine and others that are similar, across multiple web servers.Īs result, you face another challenge due to the increased complexity over a single-server installation of your application. A solution to this is to migrate your application on multiple web servers. That’s great news, but now you need to keep up with the increased traffic. Time invested and a lot of hard work hopefully results in your site or app becoming more and more popular.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |