How have you been able to keep the system stable running from tip? When you compile new versions, do you always update from tip and then compile? Or did you pull down a copy of tip and you always compile against that copy? How do you verify that patches applied to tip do not introduce unexpected effects into your system?Luke--
On Friday, October 26, 2012 9:40:03 AM UTC-5, bradfitz wrote:
On Fri, Oct 26, 2012 at 7:26 AM, Luke Mauldin <lukem...@gmail.com> wrote:Brad,Thank you for sharing, that story is a great encouragement. What version of Go are you using for dl.google.com? Are you using the standard 1.0.3 version or a customized build with selective patches applied to the core?tip. no patches.
canary group
Hi Brad,
Thank you for sharing the news. I was wondering about the "boring glue and tests"...
You said you use mainly http.ServeContent but what about the muxer, the sessions and stuff you talked about like migration from local to network file systems, and memory/request caching?
Did you write a kind of library that will be released as an official go package or is it really "raw" code you'll keep secret?
Just to know before we start coding our web framework :)
It's basically peer-to-peer memcached without versioning (which prevents hot-spotting) and coordinated cache filling (where only one of many waiting parties actually fills the cache), so there aren't thundering herds to backends on cache misses.
--
It's basically peer-to-peer memcached without versioning (which prevents hot-spotting) and coordinated cache filling (where only one of many waiting parties actually fills the cache), so there aren't thundering herds to backends on cache misses.So this is love. I have so many questions about this, I don't even know where to start.On Friday, October 26, 2012 at 3:28 PM, Brad Fitzpatrick wrote:
On 2012/10/26 Brad Fitzpatrick <brad...@golang.org> wrote:Is that Colossus a network service (meaning NFS-like) that you access
> local filesystem to network file system: just a different implementation of
> an io.ReadSeekCloser, using a Colossus one instead of an *os.File. nothing
> here to share, since Colossus is not open source.
through a client that happens to implement ReadSeekCloser or is it a
C/C++ library ?
memory/request caching: I did write a reusable library here, which I have plans to open source, but it's not ready yet. It's basically peer-to-peer memcached without versioning (which prevents hot-spotting) and coordinated cache filling (where only one of many waiting parties actually fills the cache), so there aren't thundering herds to backends on cache misses. I want to open source this once I get some time. In the meantime you can just use https://github.com/bradfitz/gomemcache or something, which is approximately the same.
Please try to use net/http by itself or the existing web "frameworks" before you write your own.
Please try to use net/http by itself or the existing web "frameworks" before you write your own.
Well, yes, when I was saying "our own web framework", I was thinking of using net/http and parts of gorilla or gomvc. Any suggestion on this?
I have no experience with either, but I heard good things about gorilla at least, and its docs seem nice. gomvc might be nice too. I don't know.I'd figure out what you need first and then decide whether it's easier to write it, or go find it (and then you can evaluate how well the packages you find solve your problem). It seems that you're starting with "which packages should I use?" rather than "what do I need?"
On Thursday, October 25, 2012 6:44:23 PM UTC-5, bradfitz wrote:Google uses Go for many internal projects, but for confidentiality reasons it's rare that we can point to a specific example. YouTube’s open source vitess project (http://code.google.com/p/vitess/) is one high-profile success story, and now I'm happy to announce another.The service that runs dl.google.com--the source for Chrome, Earth, Android SDK, and other large Google downloads--has been rewritten in Go. In fact, if you’ve had Chrome installed during the past few months then you have almost certainly talked to this Go program. :-)Why rewrite in Go? It all started back in April of this year, when I was running "apt-get update" at home and noticed that downloads from dl.google.com were stalling for no apparent reason. I asked about this on our internal Google+ and was put in touch with the right people. It turned out that the existing C++ dl.google.com service was no longer actively maintained (short of being kept alive) and that it relied on some assumptions about Google's internal architecture which were no longer true.The C++ version had grown thorny over the years (so many callbacks!), and it still used some of Google’s oldest C++ libraries, long since deprecated. It also had a few HTTP details wrong and a fair bit of duplicated code, sometimes missing pieces in some copies which were present in others. Much work was required to fix it (or rewrite it in modern C++), so we decided instead to rewrite it in Go.The Go version is much less code, more readable, more testable, doesn’t have blocking problems, and fixes a number of HTTP correctness issues from the old version. It also compiles quickly. We were prepared to take a hit in CPU and/or memory usage in exchange for readable code, but it turned out that the CPU was the same and the memory usage actually dropped!The Go version also uses interfaces to abstract out the file system, so migrating from local disk (as used in the Go version while transitioning from C++) to networked file systems (like our Colossus) was trivial. For the same reason, it was easy to introduce a memory caching layer for the most popular downloads.All this is to say: apt-get against dl.google.com is fast again. I’m happy. :-)Thanks to all my coworkers who helped with the rewrite and getting it into production!- Brad
--You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
- Brad--
- Brad--
On Oct 25, 2012 5:09 PM, "Steve McCoy" <mcc...@gmail.com> wrote:
>
> Sweet! And it uses the net/http server?
Yup. And the majority of the Handler is just a call to http.ServeContent.
Here ya go:
http://code.google.com/p/go/source/browse#hg%2Fsrc%2Fpkg%2Fnet%2Fhttp
The rest is boring glue and tests.
--
It is exciting to see Go in production usage! Great work Brad! Though I have one question just for my own curiosity. My impression is that the core Go team is mainly responsible for (or generally work on) the language design/improvement/fix and related core libraries development, it is somewhat rare (but interesting) to see you guys start tackling (or tightly involved) in specific products. Will the Go team keep supporting the products/services they wrote down the road or at some point, these projects will be transitioned to some dedicated engineering teams?
Here ya go:
http://code.google.com/p/go/source/browse#hg%2Fsrc%2Fpkg%2Fnet%2FhttpThe rest is boring glue and tests.
Brad,Thank you for sharing, that story is a great encouragement. What version of Go are you using for dl.google.com? Are you using the standard 1.0.3 version or a customized build with selective patches applied to the core?
Is there any performance numbers? How many servers, how many requests/sec, etc?