unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* GitHub on Unicorn
@ 2009-09-19 23:07 Chris Wanstrath
  2009-09-20  0:00 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wanstrath @ 2009-09-19 23:07 UTC (permalink / raw)
  To: mongrel-unicorn

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.

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

(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.

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.

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

Cheers,

-- 
Chris Wanstrath
http://github.com/defunkt

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GitHub on Unicorn
  2009-09-19 23:07 GitHub on Unicorn Chris Wanstrath
@ 2009-09-20  0:00 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2009-09-20  0:00 UTC (permalink / raw)
  To: Chris Wanstrath; +Cc: mongrel-unicorn

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-20  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-19 23:07 GitHub on Unicorn Chris Wanstrath
2009-09-20  0:00 ` Eric Wong

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).