about summary refs log tree commit homepage
path: root/DESIGN
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-04-03 00:09:16 -0700
committerEric Wong <normalperson@yhbt.net>2009-04-03 02:16:51 -0700
commit539ca9a0efc692edde5448d3e4007d35372e033d (patch)
tree426e62a71fa3f54c7e9e3700b554804a92e438ec /DESIGN
parentff59e34b6957bc6da2ac3e6c1453adcac9f591b4 (diff)
downloadunicorn-539ca9a0efc692edde5448d3e4007d35372e033d.tar.gz
Reword and expand a bit
Diffstat (limited to 'DESIGN')
-rw-r--r--DESIGN24
1 files changed, 14 insertions, 10 deletions
diff --git a/DESIGN b/DESIGN
index 8f8c63d..3543d9e 100644
--- a/DESIGN
+++ b/DESIGN
@@ -37,10 +37,11 @@
 
 * The number of worker processes should be scaled to the number of
   CPUs, memory or even spindles you have.  If you have an existing
-  Mongrel cluster, using the same amount of processes should work.
-  Let a full-HTTP-request-buffering reverse proxy like nginx manage
-  concurrency to thousands of slow clients for you.  Unicorn scaling
-  should only be concerned about limits of your backend system(s).
+  Mongrel cluster on a single-threaded app, using the same amount of
+  processes should work.  Let a full-HTTP-request-buffering reverse
+  proxy like nginx manage concurrency to thousands of slow clients for
+  you.  Unicorn scaling should only be concerned about limits of your
+  backend system(s).
 
 * Load balancing between worker processes is done by the OS kernel.
   All workers share a common set of listener sockets and does
@@ -56,8 +57,8 @@
 
 * Blocking I/O is used for clients.  This allows a simpler code path
   to be followed within the Ruby interpreter and fewer syscalls.
-  Applications that use threads should continue to work if Unicorn
-  is serving LAN or localhost clients.
+  Applications that use threads continue to work if Unicorn
+  is only serving LAN or localhost clients.
 
 * Timeout implementation is done via fchmod(2) in each worker
   on a shared file descriptor to update st_ctime on the inode.
@@ -67,8 +68,9 @@
   pwrite(2)/pread(2) are supported by base MRI, nor are they as
   portable on UNIX systems as fchmod(2).
 
-* SIGKILL is used to terminate the timed-out workers as reliably
-  as possible on a UNIX system.
+* SIGKILL is used to terminate the timed-out workers from misbehaving apps
+  as reliably as possible on a UNIX system.  The default timeout is a
+  generous 60 seconds (same default as in Mongrel).
 
 * The poor performance of select() on large FD sets is avoided
   as few file descriptors are used in each worker.
@@ -81,5 +83,7 @@
   the master to its death.
 
 * There is never any explicit real-time dependency or communication
-  between the worker processes themselves nor to the master process.
-  Synchronization is handled entirely by the OS kernel.
+  between the worker processes nor to the master process.
+  Synchronization is handled entirely by the OS kernel and shared
+  resources are never accessed by the worker when it is servicing
+  a client.