Changes between Version 103 and Version 104 of WikiStart


Ignore:
Timestamp:
05/12/2009 13:36:14 (4 years ago)
Author:
unbit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v103 v104  
    172172== Harakiri mode ??? == 
    173173 
    174 We host hundreds of unreliable WSGI apps on our servers. All of them run on hardly (at kernel level) constrained environments where having processes blocked for an implementation error will result on taking down an entire site. The harakiri mode set an alarm on start of every request to kill those one that can potentially take over the site. Obviously this alarm can be canceled by the app itself, but our customers are not so dummy :) 
     174We host hundreds of unreliable WSGI apps on our servers. All of them run on hardly (at kernel level) constrained environments where having processes blocked for an implementation error will result on taking down an entire site. The harakiri mode has two operational mode (from version 0.9.4): one that we define 'raw and a bit unreliable' (used for simple setup without a process manager) and another one that we define 'reliable' that depends on the presence of the uWSGI process manager. 
     175The first one sets a simple alarm at the start of every request. If the process get the SIGALRM it terminates itself. We call this 'a bit unrealible' cause your app or some module you use could overwrite (or simply cancel) the alarm with a simple call to alarm(). 
     176The second one use a master process shared memory area (via mmap) that maintains statistics on every worker on the pool. A the start of every request, the worker set in its dedicated area a timestamp representing the time after the process will be killed. After every successfull request this timestamp is zeroed. If the master process finds a worker with a timestamp in the past it will kill it. 
    175177 
    176178== Does my application will run faster with uWSGI ? ==