Cloud Computing Tutorial
Load Balancing in Cloud
Computing
Load balancing is a theory combining 2 or more
connections in one system. Which means also combines 2 speed or more to the
connection. And balance the traffic on the interface connection to one another.
In this case I use Mikrotik.
Imagine if you have two speedy connection but you
haven't join with load balancing, don't expect to get 2mbps speed (I assume of
1 my speedy speed is 1mbps). In contrast to when we use load balancing, speed
can be obtained doubled.
Load balancing can also be regarded as a technique to
balance the load of bandwidth internet network two or more of the same or a
different ISP, and used for a LAN network. That is, the two lanes merged into
an internet router, and then routed to the LAN network with the goal of
maximizing the performance of the LAN bandwidth.
I would think that we have two internet connections,
eg modem1 and modem2, also has a mikrotik router. Make sure that the PC /
Mikrotik router has 3 ether. The requirement is, ether for modem1, ether for
modem2 and ether for your client.
In order to facilitate easy setting step, we should
change the IP modem1 and modem2 as following:
Modem1: 192.168.1.1/24, modem2: 192.168.2.1/24. IP
Mikrotik for the client interface: 192.168.0.1/24. All of this IP can be set
according to what you needs.
Setting in Winbox interface as: ether0 = client,
ether1 = modem1, ether2 = modem2.
We continue to set Mikrotik, through the new terminal,
we follow these steps:
Setting IP Address
/ Ip address add address = 192.168.0.1/24 network =
192.168.0.0 broadcast = 192.168.0.255 interface = client
add address = 192.168.1.2/24 network = 192.168.1.0
broadcast = 192.168.1.255 interface = modem1
add address = 192.168.2.2/24 network = 192.168.2.0
broadcast = 192.168.2.255 interface = modem2
IP Route
/ Ip route
add dst-address = 0.0.0.0 / 0 gateway =
192.168.1.1,192.168.2.1 check-gateway = ping
Setting Firewall: NAT and Mangle
/ ip firewall nat
add chain = srcnat out-interface = modem1 action =
masquerade
add chain = srcnat out-interface = modem2 action =
masquerade
/ Ip firewall mangle
add chain = input in-interface = modem1 action =
mark-connection new-connection-mark = modem1_conn
add chain = input in-interface = modem2 action =
mark-connection new-connection-mark = modem2_conn
add chain = output connection-mark = modem1_conn
action = mark-routing new-routing-mark = to_modem1
add chain = output connection-mark = modem2_conn
action = mark-routing new-routing-mark = to_modem2
Routing to mangle
/ Ip route
add dst-address = 0.0.0.0 / 0 gateway = 192.168.1.1
routing-mark = to_modem1
add dst-address = 0.0.0.0 / 0 gateway = 192.168.2.1
routing-mark = to_modem2
For the successful setting up here, already successful
means of load balancing. Usually the IP route, the IP will appear blue, which
is usually confusing, whether we fail or how the settings. But don't worry,
this usually normal after our network are connected correctly to the PC which
we install the Mikrotik router. If it still blue, it means the connection from
the modem is not connected to the Mikrotik router.
Source: Irnandablog.blogspot.com