<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US">
  <id>tag:github.com,2008:/blog</id>
  <link type="text/html" rel="alternate" href="http://github.com/blog" />
  
  <title>The GitHub Blog</title>
  <updated>2009-11-19T12:32:20-08:00</updated>
  <link rel="self" href="http://feeds.feedburner.com/github" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
    <id>tag:github.com,2008:Post/551</id>
    <published>2009-11-19T12:30:47-08:00</published>
    <updated>2009-11-19T12:32:20-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/551-optimizing-asset-bundling-and-serving-with-rails" />
    <title>Optimizing asset bundling and serving with Rails</title>
    <content type="html">&lt;!-- -*-Markdown-*- --&gt;


&lt;p&gt;We spend a lot of time optimizing the front end experience at GitHub.  With that said, our asset (css, javascript, images) packaging and serving has evolved to be the best setup I've seen out of any web application I've worked on in my life.&lt;/p&gt;

&lt;p&gt;Originally, I was going to package what we have up into a plugin, but realized that much of our asset packaging is specific our particular app architecture and &lt;a href="http://github.com/blog/470-deployment-script-spring-cleaning"&gt;choice of deployment strategy&lt;/a&gt;.  If you haven't read up on our deployment recipe &lt;strong&gt;&lt;em&gt;read it now&lt;/em&gt;&lt;/strong&gt;.  I cannot stress enough how awesome it is to have 14 second no downtime deploys. In any case, you can find the relevant asset bundling code in &lt;a href="http://gist.github.com/238291"&gt;this gist&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Benefits of our asset bundling&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Users never have to wait while the server generates bundle caches, ever. With default Rails bundling, each time you deploy, each request until your server generates the bundle has to wait for the bundle to finish. This makes your site pause for about 30s after each deploy.&lt;/li&gt;
&lt;li&gt;We can use slower asset minifiers (such as YUI or Google Closure) without consequence to our users.&lt;/li&gt;
&lt;li&gt;Adding new stylesheets or javascripts is as easy as creating the file. No need to worry about including a new file in every layout file.&lt;/li&gt;
&lt;li&gt;Because we base our ASSET_ID off our git modified date, we can deploy code updates without forcing users to lose their css/js cache.&lt;/li&gt;
&lt;li&gt;We take full advantage of image caching with SSL while eliminating the unauthenticated mixed content warnings some browsers throw.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Our asset bundling is comprised of several different pieces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A particular css &amp;amp; js file structure&lt;/li&gt;
&lt;li&gt;Rails helpers to include css &amp;amp; js bundles in production and the corresponding files in development.&lt;/li&gt;
&lt;li&gt;A rake task to bundle and minify css &amp;amp; javascript as well as the accompanying changes to deploy.rb to make it happen on deploy&lt;/li&gt;
&lt;li&gt;Tweaks to our Rails environment to use smart ASSET_ID and asset servers&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;CSS &amp;amp; JS file layout&lt;/h3&gt;

&lt;p&gt;Our file layout for CSS &amp;amp; JS is detailed in the &lt;a href="http://gist.github.com/238291#file__readme.md"&gt;README&lt;/a&gt; for Javascript, but roughly resembles something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;public/javascripts
|-- README.md
|-- admin
| |-- date.js
| `-- datePicker.js
|-- common
| |-- application.js
| |-- jquery.facebox.js
| `-- jquery.relatize_date.js
|-- dev
| |-- jquery-1.3.2.js
| `-- jquery-ui-1.5.3.js
|-- gist
| `-- application.js
|-- github
| |-- _plugins
| | |-- jquery.autocomplete.js
| | `-- jquery.truncate.js
| |-- application.js
| |-- blob.js
| |-- commit.js
`-- rogue
    |-- farbtastic.js
    |-- iui.js
    `-- s3_upload.js
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I like this layout because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It allows me to namespace specific files to specific layouts (gist, github.com, iPhone, admin-only layouts, etc) &lt;strong&gt;and&lt;/strong&gt; share files between apps (common).&lt;/li&gt;
&lt;li&gt;I can lay out files however I want within each of these namespaces, and reorganize them at will.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Some might say that relying on including everything is bad practice -- but remember that web-based javascript is almost exclusively onDOMReady or later. That means that there is no dependency order problems. If you run into dependency order issues, you're writing javascript wrong.&lt;/p&gt;

&lt;h3&gt;Rails Helpers&lt;/h3&gt;

&lt;p&gt;To help with this new bundle strategy, I've created some Rails helpers to replace your standard &lt;code&gt;stylesheet_link_tag&lt;/code&gt; and &lt;code&gt;javascript_include_tag&lt;/code&gt;.  Because of the way we bundle files, it was necessary to use custom helpers. As an added benefit, these helpers are much more robust than the standard Rails helpers.&lt;/p&gt;

&lt;p&gt;Here's the code:&lt;/p&gt;

&lt;script src="http://gist.github.com/238291.js?file=bundle_helper.rb"&gt;&lt;/script&gt;


&lt;p&gt;Our &lt;code&gt;application.html.erb&lt;/code&gt; now looks something like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;%= javascript_dev ['jquery-1.3.2', "#{http_protocol}://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"] %&amp;gt;
&amp;lt;%= javascript_bundle 'common', 'github' %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This includes jQuery and all javascript files under &lt;code&gt;public/javascripts/common&lt;/code&gt; and &lt;code&gt;public/javascripts/github&lt;/code&gt; (recursively).  Super simple and we probably won't need to change this for a very long time.  We just add files to the relevant directories and they get included magically.&lt;/p&gt;

&lt;p&gt;For pages that have heavy javascript load, you can still use the regular &lt;code&gt;javascript_include_tag&lt;/code&gt; to include these files (we keep them under the &lt;code&gt;public/javascripts/rogue&lt;/code&gt; directory).&lt;/p&gt;

&lt;h3&gt;Bundle rake &amp;amp; deploy tasks&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;javascript_bundle&lt;/code&gt; and &lt;code&gt;stylesheet_bundle&lt;/code&gt; helpers both assume that in production mode, there'll be a corresponding bundle file.  Since we are proactively generating these files, you need to create these manually on each deploy.&lt;/p&gt;

&lt;script src="http://gist.github.com/238291.js?file=bundle.rake"&gt;&lt;/script&gt;


&lt;p&gt;Throw this into &lt;code&gt;lib/tasks/bundle.rake&lt;/code&gt; &lt;strong&gt;&lt;em&gt;and the corresponding YUI &amp;amp; Closure jars&lt;/em&gt;&lt;/strong&gt; and then run &lt;code&gt;rake bundle:all&lt;/code&gt; to generate your javascript.  You can customize this to use the minifying package of your choice.&lt;/p&gt;

&lt;p&gt;To make sure this gets run on deploy, you can add this to your deploy.rb:&lt;/p&gt;

&lt;script src="http://gist.github.com/238291.js?file=deploy.rb"&gt;&lt;/script&gt;


&lt;h3&gt;Tweaks to production.rb&lt;/h3&gt;

&lt;p&gt;The last step in optimizing your asset bundling for deploys is to tweak your production.rb config file to make asset serving a bit smarter.  The relevant bits in our file are:&lt;/p&gt;

&lt;script src="http://gist.github.com/238291.js?file=production.rb"&gt;&lt;/script&gt;


&lt;p&gt;There's three important things going on here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First—&lt;/strong&gt; If you hit a page using SSL, we serve all assets through SSL.  If you're on Safari, we send all CSS &amp;amp; images non-ssl since Safari doesn't have a mixed content warning.&lt;/p&gt;

&lt;p&gt;It is of note that many people &lt;a href="http://37signals.com/svn/posts/1431-mixed-content-warning-how-i-loathe-thee"&gt;suggest serving CSS &amp;amp; images non-ssl to Firefox&lt;/a&gt;.  This was good practice when Firefox 2.0 was standard, but now that Firefox 3.0 is standard (and obeys cache-control:public as it should) there is no need for this hack.  Firefox does have a mixed content warning (albeit not as prominent as IE), so I choose to use SSL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second—&lt;/strong&gt; We're serving assets out of 4 different servers.  This fakes browsers into downloading things faster and is generally good practice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Third—&lt;/strong&gt; We're hitting the git repo on the server (note our deployment setup) and getting a sha of the last changes to the &lt;code&gt;public/stylesheets&lt;/code&gt; and &lt;code&gt;public/javascripts&lt;/code&gt; directory.  We use that sha as the ASSET_ID (the bit that gets tacked on after css/js files as ?sha-here).&lt;/p&gt;

&lt;p&gt;This means that if we deploy a change that only affects &lt;code&gt;app/application.rb&lt;/code&gt; we don't interrupt our user's cache of the javascripts and stylesheets.&lt;/p&gt;

&lt;h3&gt;Conclusion&lt;/h3&gt;

&lt;p&gt;What all of this adds up to is that our deploys have almost no frontend consequence unless they intend to (changing css/js). This is &lt;strong&gt;huge&lt;/strong&gt; for a site that does dozens of deploys a day. All browser caches remain the same and there isn't any downtime while we bundle up assets.  It also means we're not afraid to deploy changes that may only affect one line of code and some minor feature.&lt;/p&gt;

&lt;p&gt;All of this is not to say there isn't room for improvement in our stack.  I'm still tracking down some SSL bugs, and always trying to cut down on the total CSS, javascript and image load we deliver on every page.&lt;/p&gt;
</content>
    <author>
      <name>kneath</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/550</id>
    <published>2009-11-18T16:11:04-08:00</published>
    <updated>2009-11-18T18:47:46-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/550-multiple-file-gist-improvements" />
    <title>Multiple file gist improvements</title>
    <content type="html">&lt;!-- -*-Markdown-*- --&gt;


&lt;p&gt;We've always had the ability to embed multiple file gists:&lt;/p&gt;

&lt;script src="http://gist.github.com/238498.js"&gt;&lt;/script&gt;


&lt;p&gt;But today we added the ability to embed specific files in a multi-file gist!&lt;/p&gt;

&lt;script src="http://gist.github.com/238498.js?file=second_file.js"&gt;&lt;/script&gt;


&lt;p&gt;We also added permalinks next to each file name so you can hard link to specific files &lt;a href="http://gist.github.com/238498#file_second_file.js"&gt;like so&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;img src="http://share.kyleneath.com/captures/gist__238498_-_GitHub-20091118-184615.jpg" /&gt;&lt;/center&gt;


&lt;p&gt;Enjoy!&lt;/p&gt;
</content>
    <author>
      <name>kneath</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/549</id>
    <published>2009-11-16T12:26:25-08:00</published>
    <updated>2009-11-16T12:28:44-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/549-github-meetup-sf-rubyconf-edition" />
    <title>GitHub Meetup SF: RubyConf Edition</title>
    <content type="html">&lt;p&gt;In SF for RubyConf? Join us this Thursday the 19th at Zeitgeist &lt;a href="http://is.gd/4WwTL"&gt;(map)&lt;/a&gt; starting at 9pm!&lt;/p&gt;
&lt;p&gt;Zeitgeist has pitchers and ample outside seating, so bring a jacket. Also: &lt;strong&gt;cash only&lt;/strong&gt;.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a href="http://is.gd/4WwTL"&gt;&lt;img src="http://img.skitch.com/20091116-xmyg7bbb7a2njng71qn8r33bts.png"/&gt;&lt;/a&gt;&lt;/div&gt; 
&lt;p&gt;Coming from the conference? Take &lt;span class="caps"&gt;BART&lt;/span&gt; to the 16th st Mission stop then walk North on Valencia &lt;a href="http://is.gd/4Wx1B"&gt;(map)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;See you there!&lt;/p&gt;</content>
    <author>
      <name>defunkt</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/548</id>
    <published>2009-11-15T17:55:36-08:00</published>
    <updated>2009-11-15T17:56:53-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/548-github-meetup-london" />
    <title>GitHub Meetup London</title>
    <content type="html">&lt;div align="center"&gt;&lt;img src="http://theroyalgeorgewc2.co.uk/images/home5.jpg"/&gt;&lt;/div&gt;
&lt;p&gt;It&amp;#8217;s the last stop on our Europe tour and we&amp;#8217;re capping things off with an evening at the &lt;a href="http://theroyalgeorgewc2.co.uk/"&gt;Royal George&lt;/a&gt; near Soho in London at 19:00 on Monday the 16th. PJ, Scott, and I will be in attendance along with (if the rumors are true) a ton of local developers and tech luminaries from the greater London area. This is a meetup you will not want to miss!&lt;/p&gt;
&lt;p&gt;&lt;iframe width="475" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;amp;source=s_q&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Royal+George+near+london&amp;amp;ie=UTF8&amp;amp;hq=Royal+George&amp;amp;hnear=London,+UK&amp;amp;ll=51.530106,-0.122051&amp;amp;spn=0.055333,0.181274&amp;amp;z=13&amp;amp;iwloc=A&amp;amp;cid=4414905488058032507&amp;amp;output=embed"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.com/maps?f=q&amp;amp;source=embed&amp;amp;hl=en&amp;amp;geocode=&amp;amp;q=Royal+George+near+london&amp;amp;ie=UTF8&amp;amp;hq=Royal+George&amp;amp;hnear=London,+UK&amp;amp;ll=51.530106,-0.122051&amp;amp;spn=0.055333,0.181274&amp;amp;z=13&amp;amp;iwloc=A&amp;amp;cid=4414905488058032507" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;</content>
    <author>
      <name>mojombo</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/547</id>
    <published>2009-11-10T17:19:44-08:00</published>
    <updated>2009-11-10T17:27:17-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/547-github-meetup-oslo-norway" />
    <title>GitHub Meetup Oslo, Norway</title>
    <content type="html">&lt;div align="center"&gt;&lt;img src="http://img.skitch.com/20091111-bir68bb7kn76kdpdtr1988m1yr.png"/&gt;&lt;/div&gt;
&lt;p&gt;Continuing our tour of Europe, PJ, and Scott, and I will be in Oslo on Friday the 13th and we&amp;#8217;d like to invite you to join us at &lt;a href="http://www.gloriaflames.no/"&gt;Gloria Flames&lt;/a&gt; at 20:30 for drinks and good times. We&amp;#8217;re rolling through Oslo specifically to meet the locals, so don&amp;#8217;t disappoint us! I&amp;#8217;ll be wearing a &amp;#8220;fork you&amp;#8221; tshirt so I&amp;#8217;ll be easy to identify. See you there!&lt;/p&gt;
&lt;p&gt;If for some reason we need to change venues, check our twitter accounts &amp;#8220;mojombo&amp;#8221;, &amp;#8220;pjhyett&amp;#8221;, and &amp;#8220;chacon&amp;#8221; for updates.&lt;/p&gt;
&lt;p&gt;&lt;iframe width="525" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?client=safari&amp;amp;oe=UTF-8&amp;amp;ie=UTF8&amp;amp;q=%22gloria+flames%22+oslo&amp;amp;fb=1&amp;amp;hq=%22gloria+flames%22&amp;amp;hnear=oslo&amp;amp;ei=1w_6SuuAG93TOP69hIcP&amp;amp;ved=0CBAQpQY&amp;amp;hl=en&amp;amp;view=map&amp;amp;cid=16559423027679171250&amp;amp;iwloc=A&amp;amp;ll=59.91291,10.761501&amp;amp;spn=0.006295,0.006295&amp;amp;output=embed"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;small&gt;&lt;a href="http://maps.google.com/maps?client=safari&amp;amp;oe=UTF-8&amp;amp;ie=UTF8&amp;amp;q=%22gloria+flames%22+oslo&amp;amp;fb=1&amp;amp;hq=%22gloria+flames%22&amp;amp;hnear=oslo&amp;amp;ei=1w_6SuuAG93TOP69hIcP&amp;amp;ved=0CBAQpQY&amp;amp;hl=en&amp;amp;view=map&amp;amp;cid=16559423027679171250&amp;amp;iwloc=A&amp;amp;ll=59.91291,10.761501&amp;amp;spn=0.006295,0.006295&amp;amp;source=embed" style="color:#0000FF;text-align:left"&gt;View Larger Map&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;</content>
    <author>
      <name>mojombo</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/546</id>
    <published>2009-11-10T06:23:12-08:00</published>
    <updated>2009-11-10T06:27:58-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/546-github-rebase-30" />
    <title>GitHub Rebase #30</title>
    <content type="html">&lt;p&gt;This is the second of many themed Rebases to come&amp;#8230;our first was the &lt;a href="http://rebase.github.com/22.html"&gt;book edition&lt;/a&gt;. In related news, the column has also been going on for &lt;a href="http://rebase.github.com/archive.html"&gt;over a year&lt;/a&gt; now! If you&amp;#8217;ve got ideas for projects to feature or themes, don&amp;#8217;t be afraid to &lt;a href="http://rebase.github.com/howto.html"&gt;message me.&lt;/a&gt;&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a href="http://gitshorty.net/"&gt;&lt;img src="http://cloud.github.com/downloads/rebase/rebase.github.com/gitshorty.jpg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Featured Project&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://github.com/nddrylliog/ooc"&gt;ooc&lt;/a&gt; is a statically typed, object oriented language with some functional programming hints that&amp;#8217;s growing up right here on GitHub. The compiler is currently written in Java, and it boils down to C99 so it can run anywhere. Grab the zip from the Downloads section or clone away and &lt;a href="http://ooc-lang.org/setup"&gt;set it up&lt;/a&gt;. The language has some &lt;a href="http://ooc-lang.org/"&gt;neat features&lt;/a&gt;: everyone&amp;#8217;s favorite generic types, a clean &lt;code&gt;import&lt;/code&gt;/&lt;code&gt;use&lt;/code&gt; system that makes Ruby&amp;#8217;s &lt;code&gt;require&lt;/code&gt; look like yesterday&amp;#8217;s news, and the &lt;code&gt;cover&lt;/code&gt; keyword that allows for some really neat abstractions over types and clean interfacing with other C code. If you&amp;#8217;re a language geek or need a breath of fresh air, &lt;a href="http://ooc-lang.org/docs/"&gt;check it out&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Notably New Projects&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://github.com/nddrylliog/rock"&gt;rock&lt;/a&gt; is an ooc compiler written in ooc, of course. This has some great examples of quite complex ooc code and aims to replace the Java compiler.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/kuzux/ooc-sqlite3"&gt;ooc-sqlite3&lt;/a&gt; is an &lt;a href="http://www.sqlite.org/"&gt;SQLite&lt;/a&gt; driver that&amp;#8217;s also just getting off the ground, but it&amp;#8217;s starting to pick up some steam. Next stop: a web framework!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/nddrylliog/woot"&gt;woot&lt;/a&gt; is ooc&amp;#8217;s first unit testing system, and is headed towards a bright future since it&amp;#8217;ll be used to test ooc itself. This dogfood is tasty!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/OneSadCookie/ooc-glew"&gt;ooc-glew&lt;/a&gt; uses &lt;a href="http://glew.sourceforge.net/"&gt;&lt;span class="caps"&gt;GLEW&lt;/span&gt;&lt;/a&gt; to open up the power of &lt;a href="http://www.opengl.org/"&gt;OpenGL&lt;/a&gt; to ooc. There&amp;#8217;s also a little Ruby magic baked in to generate the bindings since there&amp;#8217;s a lot of functions.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/eagle2com/Stirling3d"&gt;Stirling3D&lt;/a&gt; is also for the graphically minded. This project is a graphics/physics engine that also hooks into OpenGL and is starting to render some neat stuff.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://github.com/fredreichbier/ooc-yajl"&gt;ooc-yajl&lt;/a&gt; is a set of bindings to &lt;a href="http://lloyd.github.com/yajl/"&gt;yajl&lt;/a&gt;, a &lt;a href="http://rebase.github.com/21.html"&gt;former featured project&lt;/a&gt; that is a lightning fast &lt;span class="caps"&gt;JSON&lt;/span&gt; parsing library. It&amp;#8217;s also a neat example of how easy it is to hook into C libraries and how the &lt;code&gt;.use&lt;/code&gt; files work.&lt;/p&gt;</content>
    <author>
      <name>qrush</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/545</id>
    <published>2009-11-08T17:33:36-08:00</published>
    <updated>2009-11-09T11:16:23-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/545-recent-ui-updates-to-github" />
    <title>Recent UI updates to GitHub</title>
    <content type="html">&lt;!-- -*-Markdown-*- --&gt;


&lt;p&gt;On my first day at GitHub, I asked the crew what they wanted to me to do around here.  Their response was something along the lines of "make GitHub sexy"  Now that we've been rolling out steady UI updates for about a month, I thought I'd take some time and go over what all I've been working on.&lt;/p&gt;

&lt;p&gt;I previously covered the &lt;a href="http://github.com/blog/513-new-repository-lists-on-your-dashboard"&gt;updated dashboard repository lists&lt;/a&gt; and &lt;a href="http://github.com/blog/523-gist-improvements"&gt;gist improvements&lt;/a&gt;, but I haven't had a chance to go over the new userbox, &lt;a href="http://github.com/kneath"&gt;profile pages&lt;/a&gt;, &lt;a href="http://github.com/account"&gt;account pages&lt;/a&gt;, and &lt;a href="http://github.com/dashboard"&gt;dashboard headers&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://share.kyleneath.com/captures/skitched-57-20091108-173421.jpg" alt="New userbox" /&gt;&lt;/p&gt;

&lt;p&gt;The new userbox was rolled out to solve a problem we had -- people with long usernames were breaking the UI, forcing links into the next line.  I also took the time to reorganize the navigation and spruce up the look &amp;amp; feel.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://share.kyleneath.com/captures/skitched-58-20091108-173443.jpg" alt="New profile pages" /&gt;&lt;/p&gt;

&lt;p&gt;The new profile pages were one of the first purely cosmetic updates to the site.  You'll notice a new style of page header being rolled out.  This header does have some functional benefits -- but they're subtle.  On pages that are yours, you'll notice a slight yellow highlight.  This isn't terribly useful right now, but as we roll out new features you'll see why I'm going this route.&lt;/p&gt;

&lt;p&gt;I was also testing out the waters with this page.  GitHub has an extremely particular and vocal audience that doesn't represent the typical web user. I wanted to make sure that the general reaction was positive.  Judging from the twitter updates and in-person feedback I've gotten, people seem to like the changes -- so you'll see more of this style around the site in the future.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://share.kyleneath.com/captures/skitched-59-2-20091109-111602.jpg" alt="New Account Settings Pages" /&gt;&lt;/p&gt;

&lt;p&gt;Along with the new profile pages, we also rolled out updated account settings pages.  Previously, you had to edit your profile information in-place on the profile page, but now it's grouped with the rest of your settings.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://share.kyleneath.com/captures/skitched-60-20091108-173516.jpg" alt="New billing page" /&gt;&lt;/p&gt;

&lt;p&gt;Previously all of the billing information was crammed into a little grey box in the upper right of the account settings page.  With the updated account settings page I decided to create a dedicated billing page.  This page shows your plan usage in an easier to access manner and (hopefully) makes it easier to upgrade to paid accounts! :)&lt;/p&gt;

&lt;p&gt;&lt;img src="http://share.kyleneath.com/captures/skitched-61-20091108-173545.jpg" alt="New dashboard headers" /&gt;&lt;/p&gt;

&lt;p&gt;The last update we've rolled out are new-style dashboard headers.  The reason for these aren't entirely obvious right now -- but in time they will become a lot more useful.  I realize these new headers do push down the repository lists by about 60px, but it was a compromise that I decided to make to give us room for the future.&lt;/p&gt;

&lt;p&gt;Hopefully you guys are enjoying the evolution of the GitHub interface, I've been having a blast watch the feedback pour in after each push.&lt;/p&gt;
</content>
    <author>
      <name>kneath</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/544</id>
    <published>2009-11-07T09:06:04-08:00</published>
    <updated>2009-11-07T09:06:27-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/544-github-meetup-pozna%C5%84-poland" />
    <title>GitHub Meetup Poznań, Poland</title>
    <content type="html">&lt;p&gt;Tom, PJ, and Scott will be hanging out at &lt;a href="http://moodclub.pl"&gt;&lt;span class="caps"&gt;MOOD&lt;/span&gt; Club&lt;/a&gt; at 21:30 tonight (Saturday) in Poznań, Poland following the first day of the RuPy Conference. If you&amp;#8217;re local or in town for the conference, come by and say hi!&lt;/p&gt;
&lt;div align="center"&gt;&lt;img src="http://moodclub.pl/UserFiles//File/OpenCzerwiec2008/080627_Poznan_Mood_004.JPG"/&gt;&lt;/div&gt;</content>
    <author>
      <name>mojombo</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/543</id>
    <published>2009-11-04T10:35:55-08:00</published>
    <updated>2009-11-04T10:40:19-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/543-new-resque-web-ui" />
    <title>New Resque Web UI</title>
    <content type="html">&lt;p&gt;Behold the power of open source! &lt;a href="http://github.com/adamcooke"&gt;adamcooke&lt;/a&gt; has reskinned &lt;a href="http://github.com/defunkt/resque"&gt;Resque&amp;#8217;s&lt;/a&gt; web UI.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a href="http://img.skitch.com/20091104-jsqydh9jgg9ju4tkt66jqm2399.png"&gt;&lt;img src="http://img.skitch.com/20091104-8c41b9jmdtyc79jc76yap53igc.png"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align="center"&gt;&lt;a href="http://img.skitch.com/20091104-k3iuxw8hqsce86b5pdphsctsg4.png"&gt;&lt;img src="http://img.skitch.com/20091104-cs222tun9yna4s46ywt7jqdjqk.png"/&gt;&lt;/a&gt;&lt;/div&gt; 
&lt;p&gt;Also now includes live updating:&lt;/p&gt;
&lt;div align="center"&gt;&lt;a href="http://img.skitch.com/20091104-88wn3wtc9jnacas3mytxxwn6c9.png"&gt;&lt;img src="http://img.skitch.com/20091104-1nqebsad9kuac6ixaqgykqmste.png"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Thanks Adam!&lt;/p&gt;</content>
    <author>
      <name>defunkt</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/542</id>
    <published>2009-11-03T09:36:46-08:00</published>
    <updated>2009-11-03T10:02:46-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/542-introducing-resque" />
    <title>Introducing Resque</title>
    <content type="html">&lt;!-- -*-Markdown-*- --&gt;


&lt;p&gt;&lt;a href="http://github.com/defunkt/resque"&gt;Resque&lt;/a&gt; is our Redis-backed library for creating background jobs, placing
those jobs on multiple queues, and processing them later.&lt;/p&gt;

&lt;p&gt;Background jobs can be any Ruby class or module that responds to
&lt;code&gt;perform&lt;/code&gt;. Your existing classes can easily be converted to background
jobs or you can create new classes specifically to do work. Or, you
can do both.&lt;/p&gt;

&lt;p&gt;All the details are in the &lt;a href="http://github.com/defunkt/resque#readme"&gt;README&lt;/a&gt;. We've used it to process
over 10m jobs since our move to Rackspace and are extremely happy with it.&lt;/p&gt;

&lt;p&gt;But why another background library?&lt;/p&gt;

&lt;h3&gt;A Brief History of Background Jobs&lt;/h3&gt;

&lt;p&gt;We've used many different background job systems at GitHub. SQS,
Starling, ActiveMessaging, BackgroundJob, DelayedJob, and beanstalkd.
Each change was out of necessity: we were running into a
limitation of the current system and needed to either fix it or move
to something designed with that limitation in mind.&lt;/p&gt;

&lt;p&gt;With SQS, the limitation was latency. We were a young site and heard
stories on Amazon forums of multiple minute lag times between push and
pop. That is, once you put something on a queue you wouldn't be able
to get it back for what could be a while. That scared us so we moved.&lt;/p&gt;

&lt;p&gt;ActiveMessaging was next, but only briefly. We wanted something
focused more on Ruby itself and less on libraries. That is, our jobs
should be Ruby classes or objects, whatever makes sense for our app,
and not subclasses of some framework's design.&lt;/p&gt;

&lt;p&gt;BackgroundJob (bj) was a perfect compromise: you could process Ruby
jobs or Rails jobs in the background. How you structured the jobs was
largely up to you. It even included priority levels, which would let
us make "repo create" and "fork" jobs run faster than the "warm some
caches" jobs.&lt;/p&gt;

&lt;p&gt;However, bj loaded the entire Rails environment for each job. Loading
Rails is no small feat: it is CPU-expensive and takes a few
seconds. So for a job that may take less than a second, you could have
8 - 20s of added overhead depending on how big your app is, how many
dependencies it requires, and how bogged down your CPU is at that time.&lt;/p&gt;

&lt;p&gt;DelayedJob (dj) fixed this problem: it is similar to bj, with a
database-backed queue and priorities, but its workers are
persistent. They only load Rails when started, then process jobs in a
loop.&lt;/p&gt;

&lt;p&gt;Jobs are just YAML-marshalled Ruby objects. With some magic you can
turn any method call into a job to be processed later.&lt;/p&gt;

&lt;p&gt;Perfect. DJ lacked a few features we needed but we added them and
contributed the changes back.&lt;/p&gt;

&lt;p&gt;We used DJ very successfully for a few months before running into some
issues. First: backed up queues. DJ works great with small datasets,
but once your site starts overloading and the queue backs up (to, say,
30,000 pending jobs) its queries become expensive. Creating jobs can
take 2s+ and acquiring locks on jobs can take 2s+, as well. This means
an added 2s per job created for each page load. On a page that fires
off two jobs, you're at a baseline of 4s before doing anything else.&lt;/p&gt;

&lt;p&gt;If your queue is backed up because your site is overloaded, this added
overhead just makes the problem worse.&lt;/p&gt;

&lt;p&gt;Solution: move to beanstalkd. beanstalkd is great because it's fast,
supports multiple queues, supports priorities, and speaks YAML
natively. A huge queue has constant time push and pop operations,
unlike a database-backed queue.&lt;/p&gt;

&lt;p&gt;beanstalkd also has experimental persistence - we need persistence.&lt;/p&gt;

&lt;p&gt;However, we quickly missed DJ features: seeing failed jobs, seeing
pending jobs (beanstalkd only allows you to 'peek' ahead at the next
pending job), manipulating the queue (e.g. running through and
removing all jobs that were created by a bug or with a bad job name),
etc. A database-queue gives you a lot of cool features. So we moved
back to DJ - the tradeoff was worth it.&lt;/p&gt;

&lt;p&gt;Second: if a worker gets stuck, or is processing a job that will take
hours, DJ has facilities to release a lock and retry that job when
another worker is looking for work. But that stuck worker, even
though his work has been released, is still processing a job that you
most likely want to abort or fail.&lt;/p&gt;

&lt;p&gt;You want that worker to fail or restart. We added code so that,
instead of simply retrying a job that failed due to timeout, other
workers will a) fail that job permanently then b) restart the locked
worker.&lt;/p&gt;

&lt;p&gt;In a sense, all the workers were babysitting each other.&lt;/p&gt;

&lt;p&gt;But what happens when all the workers are processing stuck or long
jobs? Your queue quickly backs up.&lt;/p&gt;

&lt;p&gt;What you really need is a manager: someone like monit or god who can
watch workers and kill stale ones.&lt;/p&gt;

&lt;p&gt;Also, your workers will probably grow in memory a lot during the
course of their life. So you need to either make sure you never create
too many objects or "leak" memory, or you need to kill them when they
get too large (just like you do with your frontend web instances).&lt;/p&gt;

&lt;p&gt;At this point we have workers processing jobs with god watching them
and killing any that are a) bloated or b) stale.&lt;/p&gt;

&lt;p&gt;But how do we know all this is going on? How do we know what's sitting
on the queue? As I mentioned earlier, we had a web interface which
would show us pending items and try to infer how many workers are
working. But that's not easy - how do you have a worker you just
&lt;code&gt;kill -9&lt;/code&gt;'d gracefully manage its own state? We added a process to
inspect workers and add their info to memcached, which our web
frontend would then read from.&lt;/p&gt;

&lt;p&gt;But who monitors that process. And do we have one running on each
server? This is quickly becoming very complicated.&lt;/p&gt;

&lt;p&gt;Also we have another problem: startup time. There's a multi-second
startup cost when loading a Rails environment, not to mention the
added CPU time. With lots of workers doing lots of jobs being
restarted on a non-trival basis, that adds up.&lt;/p&gt;

&lt;p&gt;It boils down to this: GitHub is a warzone. We are constantly
overloaded and rely very, very heavily on our queue. If it's backed
up, we need to know why. We need to know if we can fix it. We need
workers to not get stuck and we need to know when they are stuck.&lt;/p&gt;

&lt;p&gt;We need to see what the queue is doing. We need to see what jobs have
failed. We need stats: how long are workers living, how many jobs are
they processing, how many jobs have been processed total, how many
errors have there been, are errors being repeated, did a deploy
introduce a new one?&lt;/p&gt;

&lt;p&gt;We need a background job system as serious as our web framework.
I highly recommend DelayedJob to anyone whose site is not 50%
background work.&lt;/p&gt;

&lt;p&gt;But GitHub is 50% background work.&lt;/p&gt;

&lt;h3&gt;In Search of a Solution&lt;/h3&gt;

&lt;p&gt;In the Old Architecture, GitHub had one slice dedicated to processing
background jobs. We ran 25 DJ workers on it and all they did was run
jobs. It was known as our "utility" slice.&lt;/p&gt;

&lt;p&gt;In the New Architecture, certain jobs needed to be run on certain
machines. With our emphasis on sharding data and high availability, a
single utility slice no longer fit the bill.&lt;/p&gt;

&lt;p&gt;Both beanstalkd and bj supported named queues or "tags," but DelayedJob
did not. Basically we needed a way to say "this job has a tag of X"
and then, when starting workers, tell them to only be interested in
jobs with a tag of X.&lt;/p&gt;

&lt;p&gt;For example, our "archive" background job creates tarballs and zip
files for download. It needs to be run on the machine which serves
tarballs and zip files. We'd tag the archive job with "file-serve" and
only run it on the file serving slice. We could then re-use this tag
with other jobs that needed to only be run on the file serving slice.&lt;/p&gt;

&lt;p&gt;We added this feature to DelayedJob but then realized it was an
opportunity to re-evaluate our background job situation. Did someone
else support this already? Was there a system which met our upcoming
needs (distributed worker management - god/monit for workers on
multiple machines along with visibility into the state)? Should we
continue adding features to DelayedJob? Our fork had deviated from
master and the merge (plus subsequent testing) was not going to be fun.&lt;/p&gt;

&lt;p&gt;We made a list of all the things we needed on paper and started
re-evaluating a lot of the existing solutions. Kestrel, AMQP,
beanstalkd (persistence still hadn't been rolled into an official
release a year after being pushed to master).&lt;/p&gt;

&lt;p&gt;Here's that list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Persistence&lt;/li&gt;
&lt;li&gt;See what's pending&lt;/li&gt;
&lt;li&gt;Modify pending jobs in-place&lt;/li&gt;
&lt;li&gt;Tags&lt;/li&gt;
&lt;li&gt;Priorities&lt;/li&gt;
&lt;li&gt;Fast pushing and popping&lt;/li&gt;
&lt;li&gt;See what workers are doing&lt;/li&gt;
&lt;li&gt;See what workers have done&lt;/li&gt;
&lt;li&gt;See failed jobs&lt;/li&gt;
&lt;li&gt;Kill fat workers&lt;/li&gt;
&lt;li&gt;Kill stale workers&lt;/li&gt;
&lt;li&gt;Kill workers that are running too long&lt;/li&gt;
&lt;li&gt;Keep Rails loaded / persistent workers&lt;/li&gt;
&lt;li&gt;Distributed workers (run them on multiple machines)&lt;/li&gt;
&lt;li&gt;Workers can watch multiple (or all) tags&lt;/li&gt;
&lt;li&gt;Don't retry failed jobs&lt;/li&gt;
&lt;li&gt;Don't "release" failed jobs&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Redis to the Rescue&lt;/h3&gt;

&lt;p&gt;Can you name a system with all of these features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Atomic, O(1) list push and pop&lt;/li&gt;
&lt;li&gt;Ability to paginate over lists without mutating them&lt;/li&gt;
&lt;li&gt;Queryable keyspace, high visibility&lt;/li&gt;
&lt;li&gt;Fast&lt;/li&gt;
&lt;li&gt;Easy to install - no dependencies&lt;/li&gt;
&lt;li&gt;Reliable Ruby client library&lt;/li&gt;
&lt;li&gt;Store arbitrary strings&lt;/li&gt;
&lt;li&gt;Support for integer counters&lt;/li&gt;
&lt;li&gt;Persistent&lt;/li&gt;
&lt;li&gt;Master-slave replication&lt;/li&gt;
&lt;li&gt;Network aware&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I can. Redis.&lt;/p&gt;

&lt;p&gt;If we let Redis handle the hard queue problems, we can focus on the
hard worker problems: visibility, reliability, and stats.&lt;/p&gt;

&lt;p&gt;And that's &lt;a href="http://github.com/defunkt/resque#readme"&gt;Resque&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With a web interface for monitoring workers, a parent / child forking
model for responsiveness, swappable failure backends (so we can send
exceptions to, say, Hoptoad), and the power of Redis, we've found
Resque to be a perfect fit for our architecture and needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://github.com/defunkt/resque"&gt;&lt;img src="http://img.skitch.com/20091102-rpekt191w28xfhwyussru44nsw.png" alt="web ui" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We hope you enjoy it. We certainly do!&lt;/p&gt;
</content>
    <author>
      <name>defunkt</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/541</id>
    <published>2009-11-02T20:21:47-08:00</published>
    <updated>2009-11-02T20:21:57-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/541-commons-based-peer-production" />
    <title>Commons Based Peer Production</title>
    <content type="html">&lt;p&gt;&lt;a href="http://github.com/ab5tract"&gt;ab5tract&lt;/a&gt; has a &lt;a href="http://mastersofmedia.hum.uva.nl/2009/11/01/git-virtue-github-and-commons-based-peer-production/"&gt;great post&lt;/a&gt; looking at GitHub &amp;#8220;through the lens of the ethics of commons-based peer production.&amp;#8221;&lt;/p&gt;
&lt;p&gt;A key quote which puts it in perspective for me is this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The software further induces virtue in its participants through the `git blame` function, which immediately calls up the person responsible for a commit. In practice it used as much to know who to praise as it is to know who to berate, but it fulfills one of the the paper’s common criteria for extant commons-based peer production: that of a mechanism to mitigate the potential impacts of malicious users. Slashdot has its moderation system, Wikipedia its editors, and git has `blame`. In fact this functionality is a crucial part of what enables the ‘virtue spreading virtue’ element of such peer production.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div align="center"&gt;&lt;a href="http://mastersofmedia.hum.uva.nl/2009/11/01/git-virtue-github-and-commons-based-peer-production"&gt;&lt;img src="http://img.skitch.com/20091103-wtqrk9ppq3si3sxh2uf3kuwhj.png"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Read &lt;a href="http://mastersofmedia.hum.uva.nl/2009/11/01/git-virtue-github-and-commons-based-peer-production/"&gt;the blog post&lt;/a&gt; for the whole scope. Thanks &lt;a href="http://github.com/ab5tract"&gt;ab5tract&lt;/a&gt;!&lt;/p&gt;</content>
    <author>
      <name>defunkt</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/540</id>
    <published>2009-11-02T14:22:57-08:00</published>
    <updated>2009-11-02T16:17:57-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/540-github-meetup-sf-9" />
    <title>GitHub Meetup SF #9</title>
    <content type="html">&lt;center&gt;
&lt;p&gt;&lt;img src="http://img.skitch.com/20091102-nefu38n6pc6crqr5e9ump6tge6.jpg"/&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;Its time for a meetup!  This week we&amp;#8217;ll be going to a faraway place, a place once thought to only exist in legend, a land they call the &amp;#8216;Richmond&amp;#8217;.  According to local lore there&amp;#8217;s a bar called &lt;a href="http://maps.google.com/maps?hl=en&amp;ie=UTF8&amp;q=buckshot&amp;fb=1&amp;gl=us&amp;hq=buckshot&amp;hnear=San+Francisco,+CA&amp;cid=0,0,1774702738057692503&amp;ei=9DzvSprjE42cswPYuNj1Aw&amp;ved=0CCsQnwIwAw&amp;ll=37.782299,-122.460887&amp;spn=0.00987,0.017316&amp;t=h&amp;z=16&amp;iwloc=A"&gt;Buckshot&lt;/a&gt; where you can play skee ball and shuffleboard while you shoot the breeze.  And even if you dont actually spot any mythical beasts, you might get a chance to talk to Chris about &lt;a href="http://github.com/blog/517-unicorn"&gt;unicorns&lt;/a&gt;. 8pm Thursday November 5th.&lt;/p&gt;</content>
    <author>
      <name>luckiestmonkey</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/538</id>
    <published>2009-11-02T11:59:36-08:00</published>
    <updated>2009-11-02T12:03:59-08:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/538-load-balancing-at-github" />
    <title>Load Balancing at GitHub</title>
    <content type="html">&lt;p&gt;We&amp;#8217;ve had a number of inquiries into why we chose &lt;a href="http://www.vergenet.net/linux/ldirectord/"&gt;ldirectord&lt;/a&gt; as our primary load balancer for the new GitHub architecture. As I&amp;#8217;ve mentioned before (and more on this later), we&amp;#8217;ve hired the excellent team at &lt;a href="http://anchor.com.au"&gt;Anchor&lt;/a&gt; as our server specialists. Our team lead over there is Matt Palmer, and we left the choice of load balancer up to him and his expertise. He&amp;#8217;s taken it upon himself to explain the driving factors behind his choice, and it makes for an enlightening read if you&amp;#8217;re interested in such things. Just head on over to the Anchor blog to check it out:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.anchor.com.au/blog/2009/10/load-balancing-at-github-why-ldirectord/"&gt;http://www.anchor.com.au/blog/2009/10/load-balancing-at-github-why-ldirectord/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Be sure to read the comments where the author of &lt;a href="http://haproxy.1wt.eu/"&gt;haproxy&lt;/a&gt; weighs in on the post and adds some additional perspective. Like most technology decisions, there is no single correct answer. Only tradeoffs and preferences.&lt;/p&gt;</content>
    <author>
      <name>mojombo</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/537</id>
    <published>2009-10-30T12:00:13-07:00</published>
    <updated>2009-10-30T12:04:08-07:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/537-post-mortem-of-this-morning-s-outage" />
    <title>Post-Mortem of This Morning's Outage</title>
    <content type="html">&lt;p&gt;At 07:53 &lt;span class="caps"&gt;PDT&lt;/span&gt; this morning the site was hit with an abnormal number of &lt;span class="caps"&gt;SSH&lt;/span&gt; connections. The script that runs after an &lt;span class="caps"&gt;SSH&lt;/span&gt; connection is accepted makes an &lt;span class="caps"&gt;RPC&lt;/span&gt; call to the backend to check for the existence of the repository so that we can display a nice error message if it is not present. The vast number of these calls that came in simultaneously caused some delays in the backend that cascaded to the frontends and resulted in a piling up of the scripts waiting for their &lt;span class="caps"&gt;RPC&lt;/span&gt; results. This, in turn, caused load to spike on the frontends further exacerbating the problem. I removed the &lt;span class="caps"&gt;RPC&lt;/span&gt; call from the &lt;span class="caps"&gt;SSH&lt;/span&gt; script to prevent this bottlenecking and soon after the barrage of &lt;span class="caps"&gt;SSH&lt;/span&gt; connections ceased.&lt;/p&gt;
&lt;p&gt;Another unrelated problem caused the outage to continue even after the &lt;span class="caps"&gt;SSH&lt;/span&gt; connection load became nominal. Last night I deployed some package upgrades to our &lt;span class="caps"&gt;RPC&lt;/span&gt; stack that had tested out fine in staging for two days. While debugging the &lt;span class="caps"&gt;SSH&lt;/span&gt; problem, I restarted the backend &lt;span class="caps"&gt;RPC&lt;/span&gt; servers to rule them out as the problem source. This was the first time these processes had been restarted since the package upgrades, as they were deemed to be backward compatible with the changes and staging had shown no problems in this regard. However, it appears that these restarts put the &lt;span class="caps"&gt;RPC&lt;/span&gt; servers into an unworking state, and they began serving requests very sporadically. After failing to identify the problem within a short period, we decided to roll back to the previous known working state. After the packages were rolled back and the daemons restarted, the site picked up and began operating normally.&lt;/p&gt;
&lt;p&gt;Full site operation returned at 09:34 &lt;span class="caps"&gt;PDT&lt;/span&gt; (some sporadic uptime was seen during the outage).&lt;/p&gt;
&lt;p&gt;Over the next week we will be doing several things:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Further testing on staging to attempt to reproduce the behavior seen on production and resolve the underlying issue.&lt;/li&gt;
	&lt;li&gt;Better &lt;span class="caps"&gt;SSH&lt;/span&gt; script logging to more quickly identify abnormal behavior.&lt;/li&gt;
	&lt;li&gt;Working towards a more fine-grained rolling deploy of infrastructure packages to limit the impact of unforeseen problems.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On a positive note, the outage led me to identify the source of several subtle bugs that have been eluding our detection for a few weeks. We are all rapidly learning the quirks of our new architecture in a production environment, and every problem leads to a more robust system in the future. Thanks for your patience over the last month and during the coming months as we work to improve the GitHub experience on every level.&lt;/p&gt;</content>
    <author>
      <name>mojombo</name>
    </author>
  </entry>
  <entry>
    <id>tag:github.com,2008:Post/536</id>
    <published>2009-10-29T09:40:49-07:00</published>
    <updated>2009-10-29T09:40:56-07:00</updated>
    <link type="text/html" rel="alternate" href="http://github.com/blog/536-jquery" />
    <title>jQuery!</title>
    <content type="html">&lt;p&gt;&lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;, which we use for GitHub itself, is now hosted right here: &lt;a href="http://github.com/jquery/jquery"&gt;http://github.com/jquery/jquery&lt;/a&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;a href="http://github.com/jquery/jquery"&gt;&lt;img src="http://img.skitch.com/20091029-dbpp26n16mqwhxgrbscsgabf89.png"/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;If you&amp;#8217;ve never contributed to the project, now&amp;#8217;s a great time. Welcome, team!&lt;/p&gt;</content>
    <author>
      <name>defunkt</name>
    </author>
  </entry>
</feed>
