From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: workers does not seems to exit when served one client
Date: Tue, 3 Nov 2009 16:56:27 +0000 [thread overview]
Message-ID: <20091103165627.GA28983@dcvr.yhbt.net> (raw)
In-Reply-To: <43f51f830911030144o62cdce0agb593cc25d35edf@mail.gmail.com>
HaiMing Yin <epaulin@gmail.com> wrote:
> quote from http://unicorn.bogomips.org/:
>
> {{{
> workers all run within their own isolated address space and only serve
> one client at a time for maximum robustness.
> }}}
>
> top shows:
>
> {{{
> 25398 www-data 20 0 268m 137m 3364 S 0 1.7 27:49.41
> unicorn_rails
> 25400 www-data 20 0 266m 135m 3364 S 0 1.7 25:24.31
> unicorn_rails
> 25397 www-data 20 0 265m 134m 3364 S 0 1.7 31:50.72 unicorn_rails
> }}}
>
> pid are the same since unicorn_rails worker started, and the RES and
> TIME+ column clearly shows that unicorn_rails did not exit after
> served one client.
>
> What I'm doing wrong?
Hi HaiMing,
You're doing nothing wrong except misunderstanding that phrase.
"one client at a time" means it's not possible to be servicing more
clients than there are worker_processes (the kernel will buffer them).
Basically your workers <=> clients mapping will look like this with
Unicorn:
unicorn master
\_ unicorn worker[0]
| \_ client[0]
\_ unicorn worker[1]
| \_ client[1]
\_ unicorn worker[2]
| \_ client[2]
...
\_ unicorn worker[M]
\_ client[M]
Where in other servers (such as Rainbows!) it'll look like this
with multiple clients running under one worker:
rainbows master
\_ rainbows worker[0]
| \_ client[0,0]
| \_ client[0,1]
| \_ client[0,2]
| ...
| \_ client[0,N]
...
\_ rainbows worker[M]
\_ client[M,0]
\_ client[M,1]
\_ client[M,2]
...
\_ client[M,N]
--
Eric Wong
next prev parent reply other threads:[~2009-11-03 16:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 9:44 workers does not seems to exit when served one client HaiMing Yin
2009-11-03 16:56 ` Eric Wong [this message]
2009-11-04 5:33 ` HaiMing Yin
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=20091103165627.GA28983@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--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).