官术网_书友最值得收藏!

Networking

The network should not be taken for granted. It is a fundamental component in data replication and must be considered in the design process. Not only must it be fast, it must also be reliable. In the following paragraphs, we look at ways to make our network resilient to faults and subsequent outages in an effort to maintain zero downtime.

Surviving network outages

Probably one of the biggest fears in a replication environment is network failure. Should the network fail, the source trail will grow as the transactions continue on the source database, ultimately filling the filesystem to 100 percent utilization that will cause the Extract process to abend. Depending on the length of the outage, GoldenGate may have to extract data from the database's archived logs. This is not ideal, as you already have the backlog of data in the trail files that need to be shipped to the target site once the network is restored. It is essential that there is sufficient disk space on the source database server to accommodate data for the longest network outage during the busiest period. Providing ample space for your trail files will help reduce the recovery time from the network outage.

Redundant networks

One of the key components in your GoldenGate implementation is the network. Without the ability to transfer data from the source to the target, it is rendered useless. So, you don't only need a fast network, but a one that will always be available. This is where redundant networks come into play, providing the necessary resilience.

NIC teaming

One method of achieving redundancy is Network Interface Card (NIC) teaming or bonding. Here, two or more Ethernet ports can be coupled to form a bonded network supporting one IP address. The main goal of NIC teaming is to use two or more Ethernet ports connected to two or more different access network switches to avoid a single point of failure. The following diagram illustrates the redundant features of NIC teaming:

Linux (OEL / RHEL 4 and above) supports NIC teaming with no additional software requirements. This is purely a matter of the network configuration stored in text files in the /etc/sysconfig/network-scripts directory.

The following steps show how to configure a server for NIC teaming:

  1. Firstly, you need to log on as root user and create a bond0 config file using the vi text editor:
    # vi /etc/sysconfig/network-scripts/ifcfg-bond0
    
  2. Then, you add the following lines to the file, replacing the IP address with your actual IP address. Save file and exit to the shell prompt:
    DEVICE=bond0
    IPADDR=192.168.1.20
    NETWORK=192.168.1.0
    NETMASK=255.255.255.0
    USERCTL=no
    BOOTPROTO=none
    ONBOOT=yes
    BONDING_OPTS="mode=1 miimon=100"
    
  3. Choose the Ethernet ports with which you wish to bond and then open both the configurations in turn using the vi text editor, replacing ethn with the respective port number:
    # vi /etc/sysconfig/network-scripts/ifcfg-eth2
    # vi /etc/sysconfig/network-scripts/ifcfg-eth4
    
  4. Modify the configuration as follows:
    # ifcfg-eth2
    DEVICE=eth2
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none
    
    # ifcfg-eth4
    DEVICE=eth4
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none
    
  5. Save the files and exit to the shell prompt.
  6. To ensure the bonding module is loaded when the bonding interface (bond0) is started, you need to modify the kernel modules configuration file as shown:
    # vi /etc/modprobe.conf
    
  7. Append the following line to the file:
    alias bond0 bonding
  8. Finally, load the bonding module and restart the network services:
    # modprobe bonding
    # service network restart
    

We now have a bonded network that will load balance when both the physical networks are available, providing additional bandwidth and enhanced performance. Should one network fail, the bandwidth will halve, but the network will still exist and be able to route packets.

主站蜘蛛池模板: 汾西县| 长子县| 疏附县| 突泉县| 田林县| 龙川县| 南宫市| 柳河县| 江城| 泰和县| 香格里拉县| 岑溪市| 江城| 驻马店市| 都兰县| 汉沽区| 永康市| 巫溪县| 安顺市| 德阳市| 新绛县| 阜城县| 土默特右旗| 玛多县| 全南县| 靖江市| 左云县| 江西省| 将乐县| 花莲县| 聊城市| 七台河市| 伽师县| 光山县| 南皮县| 衡南县| 庆城县| 铜鼓县| 竹山县| 阿拉尔市| 灵山县|