5 ms·
This is a neat idea. Does anyone know if it's possible to achieve a similar effect natively on Linux ? i.e. make the linux network stack load-balance all outgoi
by jervisfm 13y ago
This is a neat idea. Does anyone know if it's possible to achieve a similar effect natively on Linux ? i.e. make the linux network stack load-balance all outgoing connections to all available interfaces ?
- mike-cardwell 13y agoI'm pretty sure you can do this sort of load balancing on Linux without having to install any extra software, at the IP level, with the "ip rule" and "iptables" commands. EDIT: Yep: https://home.regit.org/netfilter-en/links-load-balancing/ https://home.regit.org/netfilter-en/links-load-balancing/
- anoncow16 13y agoTL;DR just buy a faster internet connection. It is possible to do per-packet load sharing in Linux as the link above suggests. Both links need to be able to source traffic using the same IP address, i.e. you can't mix comcast and dsl. The way to get around this is to have an upstream router that will source your traffic from the same IP address: client - routerD --upstream1---routerU -- the internets |-------upstream2-----| The iptables statistic module with random mode seems to work better than nth packet. Keep in mind PPS load sharing is not the most effective way to utilize links as retransmissions will slow things down. Now if you have two links to the same provider it's probably OK. You can even buy a bonded connection from most providers where they do all of this for you. You are much better off doing flow based ECMP routing: http://lkml.indiana.edu/hypermail/linux/net/0207.2/0047.html http://lkml.indiana.edu/hypermail/linux/net/0207.2/0047.html ECMP is only useful if you have a large number of clients. So you can do PPS load sharing, knowing full well that it's going to be slower than a single link some percentage of the time or just buy a faster connection. TL;DR again, just buy a faster connection.
- shocks 13y ago> just spend more money Mmmhmm, that's the true hacker spirit right there...
- toomuchtodo 13y agoTime > Money I can always make more of one of those.
- anujanpan 13y agoIt costs one to make the other.
- toomuchtodo 13y agoI guess it depends on how you want to spend your time.
- kvinnako 13y agoIf everybody follows this advice, then the isp has to/will be increasing the price of the faster connection. And this is especially true in US, since there is virtually no real competition for isp.
- dgquintas 13y ago"Bonding" at the kernel level: The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical "bonded" interface. The behavior of the bonded interfaces depends on the mode. Generally speaking, modes provide either hot standby or load balancing services. Additionally, link integrity monitoring may be performed. https://www.kernel.org/doc/Documentation/networking/bonding.txt https://www.kernel.org/doc/Documentation/networking/bonding....
- cdcarter 13y agoPeople who are downvoting dgquintas, can you explain why? Or explain why this doesn't work? It seems to fulfill the problem?
- vxxzy 13y agoBonded Interfaces operate at a lower level. There are many different "bonding modes" in the Linux Kernel. None of them would allow you to present a single "bonded" interface across multiple independent network interfaces where each interface belongs to a separate network. Case in point: You cannot "bond" two interfaces where one is connected to a cable modem and the other a DSL modem. Typically (in most configurations) a bonded interface receives one IP.
- drdaeman 13y agoYou can, but you need to make two tunnels (GRE, IPIP or whatever you fancy) over those two uplinks, then create a bond over those - if that's technically possible (I believe interfaces must at least have equal MTUs, can't remember what other requirements are). Obviously, this requires configuration on both sides of the bond. And, ahem, correct load balancing over bonded interfaces is not trivial as it may seem (although, usually it's more likely you'll be able to distribute approximately evenly than not)
- Gonzih 13y agosarcasm They hate fact that such cool feature can be implemented without node.js sacrasm
- TallGuyShort 13y agoThere's been work in this direction: http://multipath-tcp.org/ http://multipath-tcp.org/