Re:AWS Network Load Balancer
by Cieplak on Thursday September 07, 2017 @08:02PM
(#15196886)
I wonder what they wrote it in. I'd guess C++, Java or Erlang, or a combination of those.
[ Parent
| on HN ]
Chances are it's IPVS[1], maybe with some patching.
Why would one reinvent the wheel when Linux already lets you do that.
In that case it would be C since it's implemented in the Linux kernel.
I should have read the blog instead of skimming before responding.
This appears as Layer 4 load balancing, IPVS is more of Layer 3.
So the person who was voted down by mentioning HAProxy might not be too far off. It could be implemented through HAProxy + TPROXY enabled in the kernel[1]. Then just make sure that default gateway configured on targets routes back to the load balancer or it is the load balancer.
[1] https://www.loadbalancer.org/blog/configure-haproxy-with-tpr...
>"This appears as Layer 4 load balancing, IPVS is more of Layer 3."
No, IPVS is L4 load balancing. L3 load balancing would be a routing protocol plus ECMP.
Ah my bad, even the wiki link I posted said it is layer 4. I guess both solutions could be utilized then, perhaps it was IPVS then since it would be more performant than HAProxy.
There are ways of finding out more...
https://www.amazon.jobs/en/jobs/518372/senior-software-devel...
Most likely C/C++, Erlang / Java is not fast enough for this kind of work load.
It preserves source ip, so that suggests something like a kernel module, or like Intel's DPDK. Either (practically) rules out anything but C, doesn't it?
Or they could just encapsulate the packet to preserve the IP...
Happy to be educated. There's some easy way to alter the destination IP that way?
Like mention above IPVS: http://www.linuxvirtualserver.org/VS-IPTunneling.html
This is heavily used by Facebook for their loadblancer on their racks.
Re:AWS Network Load Balancer
by omribahumi on Friday September 08, 2017 @09:17AM
(#15199911)
There was a talk about this in SREcon Europe 2015:
https://www.usenix.org/conference/srecon15europe/program/pre...
Ah, ok. A kernel module, as I mentioned :)
I guess HAProxy