Why Do We Need IPVS?Sibiryov said that if you have more than one instance of an app, you need load balancing. HAProxy and MySQL proxy were around 60 percent of its speed. Rewrites DST IP, uses the same L4 and behaves like a NAT, rewriting the ip packets and forwarding request and response traffic.In testing, IPVS’ performance was nearly the same TPS as a normal connection. The response skips the load balancer, so only the request goes through IPVS.DNAT. Encapsulates IP and is routable anywhere. IPVS forwards traffic from clients to back-ends, meaning you can load balance anything, even DNS! Modes it can use include:IPIP.It’s still pretty beta, but it looks really cool. It’s a REST API for IPVS inside a Docker Container to provide IPVS routing for Docker. But there are other benefits:As Sibiryov said, “Linux kernel things are crazy magical tools from space.” So how do you put something like that to good use?To make IPVS easier to use, he wrote GORB.You just start with the golang base and go get github.com/kobolog/gorb. The Dockerfile for the GORB container is super simple because it’s a Go app. He ran Docker via Virtualbox on his Mac. In that situation, the MacVLAN Docker network plugin enables you to give containers their own MAC addresses to utilize the fastest IPVS mode by forwarding at L2.Next, Sibiryov went into a demo of GORB.The link container also needs access to the host network interface. This container has access to the host Docker daemon so it can listen to Docker events. When he ran the GORB container, he had to give direct access to his host network interface eth1 so the traffic could be accessible and routed.Next, he ran the GORB Docker Link container.
Docker Assign Ip To Loadbalancer Kuberntes Software Or ToolsSimplicity and stability, Sibiryov stressed, make IPVS a serious alternative to enterprise load-balancing hardware. It requires no special software or tools, and can leverage a 1 GBPS line with only 1 percent CPU usage in DR mode (MAC L2).Plus, IPVS has a 1,000-word man page instead of a vendor manual, and let’s not forget that it’s 15 years old. While GORB is still relatively new (he cautioned to watch out for bugs), IPVS is open-source, configurable, and like GORB, it’s also free. ConclusionTo conclude his talk, Sibiryov briefly compared IPVS to a $25,000 enterprise hardware load balancer. Then, he ran Apache Bench, and of course it was ridiculously fast. Docker automatically allocates different ports for each container externally, but the GORB Docker link container detects them and routes them all via the host’s port 80 with IPVS.
0 Comments
Leave a Reply. |
Details
AuthorMohammad ArchivesCategories |