MikroTik Load balancing technique

Overview:

First you may need to understand what is the difference between load balancing and load sharing. Load balancing try to distribute traffic evenly over multiple path. As it name, it try to balance the traffice 50%/50% over two link or 33% 33% 33% over three link and so on. Load sharing try to share traffic to difference link, but it maybe not balance. It can be 80% over first link and 20% over another link.

Which one should we choose?

In case you have two link in your network, one link is 5Mbps and another link is 10Mbps. And you use loadbalancing, it will try to balance traffic for both link. The result, one link will be congestion.

Technique

There are difference type of load balancing and load sharing technique in MikroTik

  • Per Packet Load Balancing: Using Interface Bonding feature. It's compartible with cisco ethercahnnel.
  • Per Connection Load Balancing with NTH feature: It cannot accurate balance the traffice because it's base on connection  not packet.
    Go to IP > Firewall > Mangle > Extra

  • Per Address-pair Connection Load Balancing with ECMP (Equal Cost Multiple Path) feature: It cannot balance because it's base on src and destination address. For exmple one user download file that require high Internet speed, but base on address pair, router send them the slower link. Then the faster link will be free.
    We can configure ECMP in ip > route, you need to create route with one destination and has multiple gateway.
     
  • Using PCC (Peer Connection Classified) feature: it's also cannot balance, because it's base on connection.
  • Custom Load Balancing (Policy Routing): With this feature you can share traffic base on src-address, destination address, protocol ..etc
    you can do it by mark routing in mangle, then use the routing mark to select the gateway base on routing table.

Leave a Reply

Your email address will not be published. Required fields are marked *