gunicorn/doc/htdocs/faq.html
2010-03-27 10:08:35 +01:00

104 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Green Unicorn - FAQ</title>
<link rel="alternate" type="application/rss+xml" href="/feed.xml" />
<!--[if IE]>
<script>
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
document.createElement('header');
document.createElement('nav');
document.createElement('time');
</script>
<![endif]-->
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
</head>
<body>
<div class="container">
<div id="header">
<h1 class="logo"><a href="http://gunicorn.org">gunicorn</a></h1>
<div id="links">
Get the source via
<a href="http://github.com/benoitc/gunicorn">git</a>, then
<a href="http://github.com/benoitc/gunicorn/issues">send feedback</a>
</div>
</div>
<div id="menu">
<ul id="actions">
<li><a href="installation.html">Installation</a></li>
<li><a href="usage.html">Usage</a></li>
<li><a href="deployment.html">Deployment</a></li>
<li><a href="configuration.html">Configuration</a></li>
<li><a href="tuning.html">Tuning</a></li>
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
</ul>
</div>
<div class="document" id="faq">
<h1 class="title">FAQ</h1>
<dl class="docutils">
<dt>What is a fast client?</dt>
<dd>Generally speaking a fast client is something that is being served over the
local network or from the same machine. This generally would refer to requests
forwarded from an upstream proxy. Also see the above FAQ for what a fast
client is not.</dd>
<dt>What is a slow client?</dt>
<dd>A slow client is defined as a request that can take an arbitrary amount of
time to send a request or read a response. Sometimes due to network
performance or because it is a malicious client attempting to cause problems.
Check out the <a class="reference external" href="http://ha.ckers.org/slowloris/">slowloris</a> script to generate slow client traffic.</dd>
<dt>What are sleepy applications?</dt>
<dd>Applications that expect long request/response times and/or slow clients.
Gunicorn use <a class="reference external" href="http://eventlet.net">Eventlet</a> or <a class="reference external" href="http://gevent.org">Gevent</a> to manage concurrency.</dd>
<dt>How might I test a proxy configuration?</dt>
<dd>Check out <a class="reference external" href="http://ha.ckers.org/slowloris/">slowloris</a> for a script that will generate significant slow
traffic. If your application remains responsive through out that test you
should be comfortable that all is well with your configuration.</dd>
<dt>How do I reload my application in Gunicorn?</dt>
<dd><p class="first">You can gracefully reload by sending HUP signal to gunicorn:</p>
<pre class="last literal-block">
$ kill -HUP masterpid
</pre>
</dd>
<dt>How do I increase or decrease the number of running workers dynamically?</dt>
<dd><p class="first">To increase the worker count by one:</p>
<pre class="literal-block">
$ kill -TTIN $masterpid
</pre>
<p>To decrease the worker count by one:</p>
<pre class="last literal-block">
$ kill -TTOU $masterpid
</pre>
</dd>
<dt>How do I set SCRIPT_NAME?</dt>
<dd>By default <tt class="docutils literal">SCRIPT_NAME</tt> is an empy string. The value could be set by
setting <tt class="docutils literal">SCRIPT_NAME</tt> in the environment or as an HTTP header.</dd>
<dt>How to name processes?</dt>
<dd>You need to install the Python package <a class="reference external" href="http://pypi.python.org/pypi/setproctitle">setproctitle</a>. Then you can name
your process with <cite>-n</cite> or just let the default. If you use a configuration
file you can set the process name with the proc_name option.</dd>
</dl>
</div>
<div id="footer">
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.</p>
<p>Hosted on <a href="http://github.com/">Github</a></p>
</div>
</div>
</body>
</html>