Live data from Hacker News

Google Open Source Load Balancer in Go

github.com

1–10 of 75 posts

Re: Google Open Source Load Balancer in Go

#5

This is not an official Google product. So why did it say Google in the title? This should be clarified.

It is a load balancer Google is using in production: http://techcrunch.com/2016/01/29/google-open-sources-its-see...

Edit: Here's the official Google announcement: http://google-opensource.blogspot.com/2016/01/seesaw-scalabl...

Re: Google Open Source Load Balancer in Go

#6
As much as I love Go and use it extensively for various production-grade projects, I'm wondering how suitable it really is for something like a load balancer.

My understanding is that Go's TLS performance is dramatically less than other C-based implementations like OpenSSL. I remember reading something about some licensing collisions between the Go project and some TLS stuff such that optimized encryption code couldn't be incorporated into the Go project directly. Cloudflare got around it and has much better performance for TLS.

Apart from that, GC is still a big deal and the current net/http standard library produces a lot of garbage.

Re: Google Open Source Load Balancer in Go

#7

As much as I love Go and use it extensively for various production-grade projects, I'm wondering how suitable it really is for something like a load balancer. My understanding is that Go's TLS performance is dramatically less than other C-based implementations like OpenSSL. I remember reading something about some licensing collisions between the Go project and some TLS stuff such that optimized encryption code couldn…

The 21x performance improvements to Go TLS was merged[1] and is available in go1.6rc1[2], IIRC.

[1] https://groups.google.com/forum/#!msg/golang-codereviews/m5Q... [2] https://tip.golang.org/doc/go1.6

Re: Google Open Source Load Balancer in Go

#8

As much as I love Go and use it extensively for various production-grade projects, I'm wondering how suitable it really is for something like a load balancer. My understanding is that Go's TLS performance is dramatically less than other C-based implementations like OpenSSL. I remember reading something about some licensing collisions between the Go project and some TLS stuff such that optimized encryption code couldn…

Go's TLS support should be greatly improved in Go 1.6 thanks to the performance work you referenced by Cloudflare. The licensing issue was resolved and the work was merged 11/10/2016[1]

While GC will always carry a cost, great improvements have been made over the last year and continues to be an area of focus for each Go release. Rick Hudson gave a nice update on Go's GC improves at GopherCon 2015 [2][3]

[1] https://go-review.googlesource.com/#/c/8968

[2] https://talks.golang.org/2015/go-gc.pdf.

[3] https://www.youtube.com/watch?v=aiv1JOfMjm0

Re: Google Open Source Load Balancer in Go

#9

As much as I love Go and use it extensively for various production-grade projects, I'm wondering how suitable it really is for something like a load balancer. My understanding is that Go's TLS performance is dramatically less than other C-based implementations like OpenSSL. I remember reading something about some licensing collisions between the Go project and some TLS stuff such that optimized encryption code couldn…

This component basically acts as a control plane for LVS which is implemented in the kernel. The data plane is not Go. Basically this load balancer is really the Linux kernel (and it's blazing fast).

Re: Google Open Source Load Balancer in Go

#10

As much as I love Go and use it extensively for various production-grade projects, I'm wondering how suitable it really is for something like a load balancer. My understanding is that Go's TLS performance is dramatically less than other C-based implementations like OpenSSL. I remember reading something about some licensing collisions between the Go project and some TLS stuff such that optimized encryption code couldn…

I have not looked deeply at the implementation, at all, but given that the actual site refers to this as an "algorithm" for LVS, I kinda suspect all the heavy lifting is happening at the kernel level within LVS, and the go code is merely acting as a control program that tells the backend how to behave. Many high performance systems have lower performance scripting languages or similar built in or bolted on, in order to provide easier means of development without impeding performance significantly. LVS is no exception.

The LVS-based systems I've built and used in the past often had a number of non-C components (mostly Perl, as it was 10+ years ago), for health checks, data gathering, making balancing decisions, etc. It is entirely possible this is the kind of work Go is doing (again, I haven't looked deeply into the code...but, I don't immediately see anything indicating Go is doing the actual load balancing, but it is obviously doing health checks and providing management access).

Finally, Erlang is a garbage collected language, and yet it has been used for a couple of decades for this kind of workload. So, evidence strongly suggests it is possible for a GC language to do things like this (though, again, I don't think Go is doing the network layer work here, since LVS is in the picture).

Post reply on HN