Two-Tier LVS Topology27• Synchronize the data across the real servers.• 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 changedata on the real servers. If the real servers allow large numbers of users to modify data, such as an e-commerce website, adding a third layer is preferable.There are many ways to synchronize data among real servers. For example, you can use shell scriptsto post updated web pages to the real servers simultaneously. Also, you can use programs such asrsync to replicate changed data across all nodes at a set interval. However, in environments whereusers frequently upload files or issue database transactions, using scripts or the rsync commandfor data synchronization does not function optimally. Therefore, for real servers with a high amount ofuploads, database transactions, or similar traffic, a three-tiered topology is more appropriate for datasynchronization.1.8.1. Two-Tier LVS TopologyFigure 1.21, “Two-Tier LVS Topology” shows a simple LVS configuration consisting of two tiers:LVS routers and real servers. The LVS-router tier consists of one active LVS router and one backupLVS router. The real-server tier consists of real servers connected to the private network. Each LVSrouter has two network interfaces: one connected to a public network (Internet) and one connectedto a private network. A network interface connected to each network allows the LVS routers toregulate traffic between clients on the public network and the real servers on the private network. InFigure 1.21, “Two-Tier LVS Topology”, the active LVS router uses Network Address Translation (NAT)to direct traffic from the public network to real servers on the private network, which in turn provideservices as requested. The real servers pass all public traffic through the active LVS router. From theperspective of clients on the public network, the LVS router appears as one entity.Figure 1.21. Two-Tier LVS Topology