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

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.

主站蜘蛛池模板: 灵石县| 新建县| 涿州市| 惠安县| 乌鲁木齐市| 霍邱县| 红安县| 射阳县| 永修县| 万山特区| 江川县| 夹江县| 新蔡县| 临邑县| 天长市| 凌云县| 凌源市| 乡城县| 敦化市| 平南县| 库尔勒市| 邹城市| 青海省| 天门市| 大化| 新安县| 广州市| 元江| 万安县| 普宁市| 甘德县| 孟连| 高清| 天长市| 荥阳市| 临海市| 新密市| 兴国县| 浏阳市| 襄城县| 江永县|