<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="es">
	<id>https://www.ecured.cu/index.php?action=history&amp;feed=atom&amp;title=Software_Gunicorn</id>
	<title>Software Gunicorn - Historial de revisiones</title>
	<link rel="self" type="application/atom+xml" href="https://www.ecured.cu/index.php?action=history&amp;feed=atom&amp;title=Software_Gunicorn"/>
	<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Software_Gunicorn&amp;action=history"/>
	<updated>2026-04-18T23:54:21Z</updated>
	<subtitle>Historial de revisiones para esta página en el wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://www.ecured.cu/index.php?title=Software_Gunicorn&amp;diff=3454560&amp;oldid=prev</id>
		<title>Javiermartin jc: Texto reemplazado: «&lt;div align=&quot;justify&quot;&gt;» por «»</title>
		<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Software_Gunicorn&amp;diff=3454560&amp;oldid=prev"/>
		<updated>2019-07-12T21:04:15Z</updated>

		<summary type="html">&lt;p&gt;Texto reemplazado: «&amp;lt;div align=&amp;quot;justify&amp;quot;&amp;gt;» por «»&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisión del 21:04 12 jul 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l26&quot; &gt;Línea 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 26:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;div align=&amp;quot;justify&amp;quot;&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;El&amp;#160; '''Servidor Gunicorn''' El también conocido como Green Unicorn&amp;#160; (Unicornio Verde). Este es un [[servidor HTTP]] para [[Python]] que soporta [[ WSGI]], [[Django]] y [[Paster]] de forma nativa; consume pocos recursos en&amp;#160; ejecución y es bastante rápido.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;El&amp;#160; '''Servidor Gunicorn''' El también conocido como Green Unicorn&amp;#160; (Unicornio Verde). Este es un [[servidor HTTP]] para [[Python]] que soporta [[ WSGI]], [[Django]] y [[Paster]] de forma nativa; consume pocos recursos en&amp;#160; ejecución y es bastante rápido.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Gunicorn nos permite administrar las peticiones simultáneas que nuestra aplicación recibe y que cuenta con una serie de hooks que permite ejecutar código Python en los diferentes puntos de ejecución: on_start, when_ready on_reload, pre_fork post_fork (y otros) que lo hacen más extensible.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Gunicorn nos permite administrar las peticiones simultáneas que nuestra aplicación recibe y que cuenta con una serie de hooks que permite ejecutar código Python en los diferentes puntos de ejecución: on_start, when_ready on_reload, pre_fork post_fork (y otros) que lo hacen más extensible.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki1:diff::1.12:old-2363504:rev-3454560 --&gt;
&lt;/table&gt;</summary>
		<author><name>Javiermartin jc</name></author>
		
	</entry>
	<entry>
		<id>https://www.ecured.cu/index.php?title=Software_Gunicorn&amp;diff=2363504&amp;oldid=prev</id>
		<title>Idalmis0302ad jc.hlg en 12:59 30 oct 2014</title>
		<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Software_Gunicorn&amp;diff=2363504&amp;oldid=prev"/>
		<updated>2014-10-30T12:59:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;es&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Revisión anterior&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisión del 12:59 30 oct 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot; &gt;Línea 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línea 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; sudo apt-get install gunicorn&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; sudo apt-get install gunicorn&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; o usando pip&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; o usando pip&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;1&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;2&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; pip install gunicorn&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; pip install gunicorn&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Idalmis0302ad jc.hlg</name></author>
		
	</entry>
	<entry>
		<id>https://www.ecured.cu/index.php?title=Software_Gunicorn&amp;diff=2357861&amp;oldid=prev</id>
		<title>Idalmis0302ad jc.hlg: Página creada con '{{Ficha Software |nombre=Gunicorn |familia=Servidores web |imagen=Logo_gunicorn2-240x240.png‎ |tamaño= |descripción= |imagen2= |tamaño2= |descripción2= |creador= |dise...'</title>
		<link rel="alternate" type="text/html" href="https://www.ecured.cu/index.php?title=Software_Gunicorn&amp;diff=2357861&amp;oldid=prev"/>
		<updated>2014-10-22T19:15:52Z</updated>

		<summary type="html">&lt;p&gt;Página creada con &amp;#039;{{Ficha Software |nombre=Gunicorn |familia=&lt;a href=&quot;/index.php?title=Servidores_web&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Servidores web (la página no existe)&quot;&gt;Servidores web&lt;/a&gt; |imagen=Logo_gunicorn2-240x240.png‎ |tamaño= |descripción= |imagen2= |tamaño2= |descripción2= |creador= |dise...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Página nueva&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Ficha Software&lt;br /&gt;
|nombre=Gunicorn&lt;br /&gt;
|familia=[[Servidores web]]&lt;br /&gt;
|imagen=Logo_gunicorn2-240x240.png‎&lt;br /&gt;
|tamaño=&lt;br /&gt;
|descripción=&lt;br /&gt;
|imagen2=&lt;br /&gt;
|tamaño2=&lt;br /&gt;
|descripción2=&lt;br /&gt;
|creador=&lt;br /&gt;
|diseñador=&lt;br /&gt;
|modelo de desarrollo=[[Software libre]]&lt;br /&gt;
|fecha de creación=&lt;br /&gt;
|lanzamiento inicial=[[2014]]&lt;br /&gt;
|versiones=&lt;br /&gt;
|última  versión estable=&lt;br /&gt;
|núcleo=&lt;br /&gt;
|tipo de núcleo=&lt;br /&gt;
|plataformas soportadas=&lt;br /&gt;
|género=[[Servidores web]]&lt;br /&gt;
|sistemas operativos=[[GNU/Linux]]&lt;br /&gt;
|idioma=&lt;br /&gt;
|licencia=&lt;br /&gt;
|premios=&lt;br /&gt;
|web=&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div align=&amp;quot;justify&amp;quot;&amp;gt;&lt;br /&gt;
El  '''Servidor Gunicorn''' El también conocido como Green Unicorn  (Unicornio Verde). Este es un [[servidor HTTP]] para [[Python]] que soporta [[ WSGI]], [[Django]] y [[Paster]] de forma nativa; consume pocos recursos en  ejecución y es bastante rápido.&lt;br /&gt;
Gunicorn nos permite administrar las peticiones simultáneas que nuestra aplicación recibe y que cuenta con una serie de hooks que permite ejecutar código Python en los diferentes puntos de ejecución: on_start, when_ready on_reload, pre_fork post_fork (y otros) que lo hacen más extensible.&lt;br /&gt;
&lt;br /&gt;
== Instalación  ==&lt;br /&gt;
&lt;br /&gt;
Podemos instalarlo en Debian y derivados ejecutando &lt;br /&gt;
*1&lt;br /&gt;
 sudo apt-get install gunicorn&lt;br /&gt;
 o usando pip&lt;br /&gt;
*1&lt;br /&gt;
 pip install gunicorn&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Puede que también se necesite instalar [[Eventlet]] o [[Gevent]] si se espera que el código de la aplicación pueda hacer pausas durante largos períodos de tiempo durante el procesamiento de solicitudes. &lt;br /&gt;
&lt;br /&gt;
*1 pip install eventlet  # Para workers eventlet&lt;br /&gt;
*2 pip install gevent    # Para workers gevent&lt;br /&gt;
*3 pip install greenlet  # Requerido para ambos&lt;br /&gt;
&lt;br /&gt;
==Uso==&lt;br /&gt;
&lt;br /&gt;
Después de instalado ya podemos tener acceso a los comandos disponibles en Gunicorn que son: &lt;br /&gt;
&lt;br /&gt;
* gunicorn: utilizado para servir aplicaciones WSGI.&lt;br /&gt;
* gunicorn_django: utilizado para servir aplicaciones Django.&lt;br /&gt;
* gunicorn_paster: para frameworks compatibles con Paster como Pyramid, Pylons,  TurboGears 2, …&lt;br /&gt;
&lt;br /&gt;
1* gunicorn [OPTIONS] APP_MODULE&lt;br /&gt;
&lt;br /&gt;
Donde APP_MODULE se define como $(MODULE_NAME):$(VARIABLE_NAME).  El nombre del módulo puede ser la ruta completa del fichero y el nombre  de la variable se refiere a la variable que guarda la aplicación WSGI.&lt;br /&gt;
Un ejemplo de uso sería el siguiente:&lt;br /&gt;
&lt;br /&gt;
1* gunicorn --workers 5 test:application&lt;br /&gt;
&lt;br /&gt;
==Opciones más relevantes están==&lt;br /&gt;
&lt;br /&gt;
* c FILE, --config FILE. La ruta del fichero de configuración o módulo Python.&lt;br /&gt;
* b ADDRESS, --bind ADDRESS. Un string de la forma: ‘HOST’, ‘HOST:PORT’, ‘unix:PATH’. Un IP es un HOST válido.&lt;br /&gt;
* w INT, --workers INT. El número de workers, que por defecto es 1.&lt;br /&gt;
* k STRING, --worker-class STRING. El tipo de worker, que por defecto es sync pero pueden ser: sync, eventlet, gevent y tornado. Personalmente prefiero Gevent. &lt;br /&gt;
* worker-connections INT. La cantidad máxima de clientes simultáneos. Por defecto este valor es de 1000.&lt;br /&gt;
* u USER, --user USER. El usuario que ejecutará el proceso. Este valor puede ser el uid o el nombre del usuario.&lt;br /&gt;
* g GROUP, --group GROUP. El grupo que ejecutará el proceso. Este valor puede ser el gid o el nombre del grupo.&lt;br /&gt;
&lt;br /&gt;
El archivo de configuración debe ser un archivo de código fuente Python válido. Sólo tiene que ser legible desde el sistema de archivos. Más específicamente, no necesita ser importable. Cualquier Python es válida. Sólo considere que este se ejecutará cada vez que se inicia Gunicorn (incluso cuando usted señala Gunicorn para recargar).&lt;br /&gt;
Para establecer un parámetro, simplemente asignar a la misma. No hay una sintaxis especial. Los valores suministrados por el usuario serán utilizados para los valores de configuración.&lt;br /&gt;
&lt;br /&gt;
1 import multiprocessing&lt;br /&gt;
2 bind = &amp;quot;127.0.0.1:8000&amp;quot;&lt;br /&gt;
3 workers = multiprocessing.cpu_count() * 2 + 1&lt;br /&gt;
&lt;br /&gt;
==Workers==&lt;br /&gt;
&lt;br /&gt;
Con respecto al número de workers es válido aclarar que no debe asociarse con el número de clientes que espera tener. Gunicorn sólo debería necesitar 4-12 procesos de trabajo para manejar cientos o miles de peticiones por segundo. &lt;br /&gt;
Gunicorn se basa en el sistema operativo para proporcionar todo el equilibrio de la carga cuando tramita las solicitudes.&lt;br /&gt;
La cantidad de workers a usar dependerá de las condiciones en las que  se ejecutará tu aplicación, esta cantidad generalmente se recomienda que sea igual a la (cantidad de CPUs * 2) + 1.&lt;br /&gt;
&lt;br /&gt;
Gunicorn es para servir todo lo dinámico de un  proyecto en un servidor. Se recomienda usarlo en  combinación con Nginx (un servidor que nos sirve de proxy HTTP) para servir los ficheros estáticos y Gevent para atender las peticiones de forma asincrónica.&lt;br /&gt;
&lt;br /&gt;
== Fuentes ==&lt;br /&gt;
&lt;br /&gt;
* [https://humanos.uci.cu/2014/10/comparte-tu-software-gunicorn/] Visto el 22 de octubre del 2014 en humanos.uci.cu&lt;br /&gt;
&lt;br /&gt;
[[Category:Informática]][[Category:Software]][[Category:Servidores_web]]&lt;/div&gt;</summary>
		<author><name>Idalmis0302ad jc.hlg</name></author>
		
	</entry>
</feed>