Looking for a Golang talk about Zero Downtime upgrades

xuanbao · · 111 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I&#39;m looking for a Go talk video link I have lost. I have seen it in 2014 and the main topic was about zero downtime upgrades in Go.</p> <p>The guy in the video explained the concept and gave some snippets based on fork and exec. He mentioned also that this technic was older than him.</p> <p>Impossible to find in on Google. May be someone knows it here?</p> <hr/>**评论:**<br/><br/>earthboundkid: <pre><p>I don&#39;t know about the talk, but the technique is well discussed:</p> <ul> <li><a href="http://blog.nella.org/zero-downtime-upgrades-of-tcp-servers-in-go/" rel="nofollow">http://blog.nella.org/zero-downtime-upgrades-of-tcp-servers-in-go/</a></li> <li><a href="https://github.com/rcrowley/goagain" rel="nofollow">https://github.com/rcrowley/goagain</a></li> <li><a href="https://groups.google.com/forum/#!topic/golang-nuts/41TPj4PWBI8" rel="nofollow">https://groups.google.com/forum/#!topic/golang-nuts/41TPj4PWBI8</a></li> <li>And checkout Go 1.8&#39;s new <a href="https://tip.golang.org/pkg/net/http/#Server.Shutdown" rel="nofollow">Server.Shutdown</a> method.</li> </ul></pre>tame_komodo: <pre><p>Here&#39;s another one: <a href="https://grisha.org/blog/2014/06/03/graceful-restart-in-golang/" rel="nofollow">https://grisha.org/blog/2014/06/03/graceful-restart-in-golang/</a></p> <p>The methods are probably all same.</p></pre>mcouturier: <pre><p>Just a friendly observation, we tend to try to use the same language for everything to keep thing homogenous even if the problem has been solved already (which often is tried, tested and true). This case is not specific to Go programs and tools are already in place which solves it for all languages. Anyways back to the main point...</p> <p>In this case, just putting a frontend before your Go servers like haproxy helps you to achieve that without touching a single line of your Go code. I agree you have to do some devops now but I prefer it that way as it brings a lot of benefits down the line (SSL termination, load balancing, AB testing, etc).</p> <p>I use at least 2 Go servers which are identical behind haproxy. Everything can live on the same server if your resources are scarce but personally I use 3+. When I deploy I disable half of the servers on haproxy (it stops sending traffic to half of the Go servers behind it). I upload the new binary and restart the Go servers. I re-enable the disabled servers on haproxy. I do the same thing for the other half of the Go servers. </p> <p>It seems a lot of work but I have ansible scripts to manage that and it&#39;s painless. I should write something and open source that since I see this question come up a lot.</p></pre>
111 次点击  
加入收藏 微博
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet