2.1.1. Data Replication and Data Sharing Between Real Servers
Since there is no built-in component in LVS clustering to share the same data between the real servers, the administrator has two basic options:
Synchronize the data across the real server pool
Add a third layer to the topology for shared data access
The first option is preferred for servers that do not allow large numbers of users to upload or change data on the real servers. If the cluster allows large numbers of users to modify data, such as an e-commerce website, adding a third layer is preferable.
There are many ways an administrator can choose to synchronize data across the pool of real servers. For instance, shell scripts can be employed so that if a Web engineer updates a page, the page is posted to all of the servers simultaneously. Also, the cluster administrator can use programs such as rsync to replicate changed data across all nodes at a set interval.
However, this type of data synchronization does not optimally function if the cluster is overloaded with users constantly uploading files or issuing database transactions. For a cluster with a high load, a three-tiered topology is the ideal solution.