unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Chris Wanstrath <chris@ozmm.org>
Cc: mongrel-unicorn@rubyforge.org
Subject: Re: GitHub on Unicorn
Date: Sat, 19 Sep 2009 17:00:02 -0700	[thread overview]
Message-ID: <20090920000002.GB6650@dcvr.yhbt.net> (raw)
In-Reply-To: <8b73aaca0909191607r63fd3987w552728c799fb0f0a@mail.gmail.com>

Chris Wanstrath <chris@ozmm.org> wrote:
> Just wanted to say that GitHub has been running on Unicorn for about
> two weeks now. In that time it's successfully served millions of pages
> and has survived two separate DDoS attacks.

Wow, this is wonderful news!

> Here's the config file we currently use (complete with a fun hack to
> gracefully kill the old master when a new worker pool is ready):
> 
> http://gist.github.com/189623

Great use of the before/after_fork hooks

One possible issue is a race condition in the before_fork hook,
so I'd put a rescue to protect the File.read in the before_fork:

old master                    new master
-----------------------------------------------------------------------
                              before_fork for worker=0
                              File.exist?(old_pid) => true
                              Process.kill :QUIT, File.read(old_pid).to_i

                              before_fork for worker=1
                              File.exist?(old_pid) => true
processes :QUIT
unlinks old_pid
                              # the File.read will raise Errno::ENOENT:
                              Process.kill :QUIT, File.read(old_pid).to_i

> (Tom's thread with the `backlog` fix concerns our new servers, which
> aren't yet in production.)
> 
> I plan to do a writeup on our transition from mongrel_cluster to
> Unicorn in the near future, in case others are interested. I'll post
> the link here when it's available.

Looking forward to it!

> Also: I'm keeping a mirror of the project at
> http://github.com/defunkt/unicorn for any other GH users who want to
> watch updates in their generalized feed. I update it semi-regularly.

Cool, more exposure's always good.

Small nit: "Eric Wong's Unicorn" doesn't sound quite right...
While I am the benevolent dictator for now, I do welcome contributions.

I could not have have built it without standing on the shoulders of
Mongrel and the existence of Rack and nginx.

Personally, I try to keep a low public profile and it's always been an
weird balancing act trying to get people to use my work at the same
time...

> Long live fork(2)! And thanks again for the project.

:)

-- 
Eric Wong

      reply	other threads:[~2009-09-20  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-19 23:07 GitHub on Unicorn Chris Wanstrath
2009-09-20  0:00 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090920000002.GB6650@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=chris@ozmm.org \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).