SlideShare una empresa de Scribd logo
Apache ha muerto  Viva LIGHTTPD! [email_address] * No creo realmente que el Apache haya muerto, pero si que ahora hay mas opciones, algunas mucho mas interesantes, como Lighty. El titulo de la presentacion es para provocar, nomas.
Características ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
La  filosofía   Lighty ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cuando si, cuando no ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Quien usa Lighttpd ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Módulos  disponibles ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Problemas y soluciones ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Configuración condicional ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
FastCGI ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Apache mod_php vs FastCGI ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1 servidor HTTP, 3 servidores PHP FastCGI FastCGI FastCGI HTTP
Balanceo de Carga PHP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Un servidor por "zona" $HTTP["url"] =~ " ^/forum " { proxy-core.protocol = "fastcgi" proxy-core.backends = ( " 10.0.0.1:1000 ") } $HTTP["url"] =~ " ^/torrents " { proxy-core.protocol = "fastcgi" proxy-core.backends = ( " 10.0.0.99:1000 ") }
Distribuyendo la carga  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Distribuyendo la carga $HTTP["url"] =~ "php$" { proxy-core.protocol = "fastcgi" proxy-core.backends = ( "10.0.0.1:1000" ) } else $HTTP["url"] =~ "^/images/[0-4]/" { proxy-core.protocol = "http" proxy-core.backends = ( "10.0.0.2:80" ) } else $HTTP["url"] =~ "^/images/[5-9]/" { proxy-core.protocol = "http" proxy-core.backends = ( "10.0.0.3:80" ) } The web is a pipe!
Sirviendo downloads "protegidos" ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sirviendo archivos "protegidos" ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Solución  Lighty recanchera ,[object Object],[object Object],[object Object],[object Object],[object Object],<?php if (usuario_registrado())  header(&quot;X-Sendfile: /opt/files/pescaditos.exe&quot;);
Scripteando las tripas de Lighty ,[object Object],[object Object],[object Object],[object Object],[object Object]
Un archivo al azar En PHP, PHP+X-Sendfile y LUA <?php header(&quot;Content-Type: image/png&quot;); print file_get_contents(&quot;imgs/&quot;.rand(0,9).&quot;.png&quot;); <?php header(&quot;Content-Type: image/png&quot;); header(&quot;X-Sendfile: &quot;.getcwd(). &quot;/imgs/&quot;.rand(0,9).&quot;.png&quot;); lighty.env[&quot;request.uri&quot;]=&quot;/imgs/&quot; ..  math.random(9) .. &quot;.png&quot; return lighty.RESTART_REQUEST
magnet, minibenchmark ,[object Object],[object Object],[object Object],[object Object]
magnet: cache html  ,[object Object],[object Object],[object Object],[object Object]
magnet: cache html  Guardar el output HTML en el archivo temporal: <?php function cache_html(){ function write_html($text){ $info = stat($_SERVER[&quot;SCRIPT_FILENAME&quot;]);  file_put_contents(&quot;/tmp/&quot;.$info['ino'].&quot;.html&quot;,$text); return false; } ob_start(&quot;write_html&quot;); }
magnet: cache html  Devolver el contenido del archivo temporal si existe y terminar la ejecucion (PHP): <?php function show_cached(){ $info = stat($_SERVER[&quot;SCRIPT_FILENAME&quot;]); $cache_file = &quot;/tmp/&quot;.$info['ino'].&quot;.html&quot;; if (file_exists($cache_file)){ print file_get_contents($cache_file); exit; } }
magnet: cache html  Devolver el contenido del archivo temporal si existe y terminar la ejecucion (LUA): info = lighty.stat(lighty.env[&quot;physical.path&quot;]) cache_path = &quot;/tmp/&quot;..info[&quot;st_ino&quot;]..&quot;.html&quot; cache_info = lighty.stat(cache_path) if (cache_info) then lighty.env[&quot;physical.path&quot;] = cache_path end
magnet: cache html  ,[object Object],[object Object],[object Object]
Ayuda, por dios! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Creative Commons  Attribution-Noncommercial Share Alike 2.5  Argentina License

Más contenido relacionado

La actualidad más candente

Servidor http
Servidor httpServidor http
Presentacion ventajas y desventajas de un servidor compartido
Presentacion ventajas y desventajas de un servidor compartidoPresentacion ventajas y desventajas de un servidor compartido
Presentacion ventajas y desventajas de un servidor compartido
Enrique Rodriguez
 
Servidor http(web)
Servidor http(web)Servidor http(web)
Servidor http(web)
Luis Enrique Hernandez Anibal
 
Cuadro comparativo de apache y iis
Cuadro comparativo de apache y iisCuadro comparativo de apache y iis
Cuadro comparativo de apache y iis
Angel Cisneros
 
Tabla comparativa servidores web
Tabla comparativa servidores webTabla comparativa servidores web
Tabla comparativa servidores web
juancma77
 
Mapa Conceptual de los Servidor Apache y IIS.
Mapa Conceptual de los Servidor Apache y IIS.Mapa Conceptual de los Servidor Apache y IIS.
Mapa Conceptual de los Servidor Apache y IIS.
Heysel Ramirez
 
Cliente web
Cliente web Cliente web
Cliente web
anllytunena
 
¿Cómo elegir servidor web?
¿Cómo elegir servidor web?¿Cómo elegir servidor web?
¿Cómo elegir servidor web?
Juan Belón Pérez
 
Servidores web
Servidores webServidores web
Servidores web
stefita9101
 
Curso TIC de PHP y MSQL Parte 1
Curso TIC de PHP y MSQL Parte 1Curso TIC de PHP y MSQL Parte 1
Curso TIC de PHP y MSQL Parte 1Wilian
 
Clientes web
Clientes webClientes web
Clientes web
donzippy
 
CUADRO COMPARATIVO TIPOS DE SERVIDORES Y EL MANEJO DE SUS DATOS
CUADRO COMPARATIVO TIPOS DE SERVIDORES Y EL MANEJO DE SUS DATOS CUADRO COMPARATIVO TIPOS DE SERVIDORES Y EL MANEJO DE SUS DATOS
CUADRO COMPARATIVO TIPOS DE SERVIDORES Y EL MANEJO DE SUS DATOS
Lina Chavez
 
Cliente web y servidor web
Cliente web y servidor webCliente web y servidor web
Cliente web y servidor web
Chamakito Edwinshito Cruz Guevara
 

La actualidad más candente (20)

Servidor http
Servidor httpServidor http
Servidor http
 
Presentacion ventajas y desventajas de un servidor compartido
Presentacion ventajas y desventajas de un servidor compartidoPresentacion ventajas y desventajas de un servidor compartido
Presentacion ventajas y desventajas de un servidor compartido
 
Servidor http(web)
Servidor http(web)Servidor http(web)
Servidor http(web)
 
Cuadro comparativo de apache y iis
Cuadro comparativo de apache y iisCuadro comparativo de apache y iis
Cuadro comparativo de apache y iis
 
Servicios de red amp
Servicios de red   ampServicios de red   amp
Servicios de red amp
 
Tabla comparativa servidores web
Tabla comparativa servidores webTabla comparativa servidores web
Tabla comparativa servidores web
 
Qué es un servidor web
Qué es un servidor webQué es un servidor web
Qué es un servidor web
 
Mapa Conceptual de los Servidor Apache y IIS.
Mapa Conceptual de los Servidor Apache y IIS.Mapa Conceptual de los Servidor Apache y IIS.
Mapa Conceptual de los Servidor Apache y IIS.
 
Cliente web
Cliente web Cliente web
Cliente web
 
¿Cómo elegir servidor web?
¿Cómo elegir servidor web?¿Cómo elegir servidor web?
¿Cómo elegir servidor web?
 
Servidor WEB y FTP
Servidor WEB y FTPServidor WEB y FTP
Servidor WEB y FTP
 
Recuperacion
RecuperacionRecuperacion
Recuperacion
 
Servidor web
Servidor webServidor web
Servidor web
 
Servidores web
Servidores webServidores web
Servidores web
 
Curso TIC de PHP y MSQL Parte 1
Curso TIC de PHP y MSQL Parte 1Curso TIC de PHP y MSQL Parte 1
Curso TIC de PHP y MSQL Parte 1
 
Clientes web
Clientes webClientes web
Clientes web
 
Mantenimiento Servidor de correo
Mantenimiento Servidor de correo Mantenimiento Servidor de correo
Mantenimiento Servidor de correo
 
CUADRO COMPARATIVO TIPOS DE SERVIDORES Y EL MANEJO DE SUS DATOS
CUADRO COMPARATIVO TIPOS DE SERVIDORES Y EL MANEJO DE SUS DATOS CUADRO COMPARATIVO TIPOS DE SERVIDORES Y EL MANEJO DE SUS DATOS
CUADRO COMPARATIVO TIPOS DE SERVIDORES Y EL MANEJO DE SUS DATOS
 
Cuadro comparativo 2
Cuadro comparativo 2Cuadro comparativo 2
Cuadro comparativo 2
 
Cliente web y servidor web
Cliente web y servidor webCliente web y servidor web
Cliente web y servidor web
 

Similar a Apache ha muerto, Viva Lighttpd

Curso de php
Curso de phpCurso de php
Performance en Drupal 7
Performance en Drupal 7Performance en Drupal 7
Performance en Drupal 7
Karim Boudjema Schombourg
 
High performance Web Sites
High performance Web SitesHigh performance Web Sites
High performance Web Sites
openfinanceDev
 
Introducción a PHP5
Introducción a PHP5Introducción a PHP5
Introducción a PHP5
Open University, KMi
 
PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf
PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdfPHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf
PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf
Raaulroodriguez
 
ROA - Resource Oriented Architecture
ROA - Resource Oriented ArchitectureROA - Resource Oriented Architecture
ROA - Resource Oriented Architecture
Javier Lafora Rey
 
Java 7- Java Day Guatemala
Java 7- Java Day GuatemalaJava 7- Java Day Guatemala
Java 7- Java Day Guatemala
Víctor Leonel Orozco López
 
Aspnet40 Cache Extensibility
Aspnet40 Cache ExtensibilityAspnet40 Cache Extensibility
Aspnet40 Cache ExtensibilityChristian Strevel
 
Http al descubierto
Http al descubiertoHttp al descubierto
Http al descubierto
Alan Resendiz
 
Http al descubierto
Http al descubiertoHttp al descubierto
Http al descubierto
Jorge Ivan Zs
 
Sacándole el jugo a apache
Sacándole el jugo a apacheSacándole el jugo a apache
Sacándole el jugo a apache
Javier Aroche
 
Scripting para Pentesters v1.0
Scripting para Pentesters v1.0Scripting para Pentesters v1.0
Scripting para Pentesters v1.0wcuestas
 
Hacking uploaders
Hacking uploadersHacking uploaders
Hacking uploaders
linenoise
 
Symfony2: Optimización y rendimiento
Symfony2: Optimización y rendimientoSymfony2: Optimización y rendimiento
Symfony2: Optimización y rendimiento
Raul Fraile
 
Plone en La Jornada
Plone en La JornadaPlone en La Jornada
Plone en La Jornada
Héctor Velarde
 
PHP en el 2015
PHP en el 2015PHP en el 2015
PHP en el 2015
Asier Marqués
 

Similar a Apache ha muerto, Viva Lighttpd (20)

Curso de php
Curso de phpCurso de php
Curso de php
 
Performance en Drupal 7
Performance en Drupal 7Performance en Drupal 7
Performance en Drupal 7
 
Rendimiento extremo en php
Rendimiento extremo en phpRendimiento extremo en php
Rendimiento extremo en php
 
High performance Web Sites
High performance Web SitesHigh performance Web Sites
High performance Web Sites
 
Introducción a PHP5
Introducción a PHP5Introducción a PHP5
Introducción a PHP5
 
PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf
PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdfPHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf
PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf PHP.pdf
 
ROA - Resource Oriented Architecture
ROA - Resource Oriented ArchitectureROA - Resource Oriented Architecture
ROA - Resource Oriented Architecture
 
Java 7- Java Day Guatemala
Java 7- Java Day GuatemalaJava 7- Java Day Guatemala
Java 7- Java Day Guatemala
 
Aspnet40 Cache Extensibility
Aspnet40 Cache ExtensibilityAspnet40 Cache Extensibility
Aspnet40 Cache Extensibility
 
Http al descubierto
Http al descubiertoHttp al descubierto
Http al descubierto
 
Http al descubierto
Http al descubiertoHttp al descubierto
Http al descubierto
 
Sacándole el jugo a apache
Sacándole el jugo a apacheSacándole el jugo a apache
Sacándole el jugo a apache
 
Scripting para Pentesters v1.0
Scripting para Pentesters v1.0Scripting para Pentesters v1.0
Scripting para Pentesters v1.0
 
Hacking uploaders
Hacking uploadersHacking uploaders
Hacking uploaders
 
Symfony2: Optimización y rendimiento
Symfony2: Optimización y rendimientoSymfony2: Optimización y rendimiento
Symfony2: Optimización y rendimiento
 
Bulma 441
Bulma 441Bulma 441
Bulma 441
 
PHP IUTE
PHP IUTEPHP IUTE
PHP IUTE
 
Plone en La Jornada
Plone en La JornadaPlone en La Jornada
Plone en La Jornada
 
PHP en el 2015
PHP en el 2015PHP en el 2015
PHP en el 2015
 
DiseñO Pagina Web
DiseñO Pagina WebDiseñO Pagina Web
DiseñO Pagina Web
 

Último

plan contable empresarial para empresass
plan contable empresarial para empresassplan contable empresarial para empresass
plan contable empresarial para empresass
SUSANJHEMAMBROSIOSEV1
 
capitulo-5-libro-contabilidad-costo-volumen-utilidad.pdf
capitulo-5-libro-contabilidad-costo-volumen-utilidad.pdfcapitulo-5-libro-contabilidad-costo-volumen-utilidad.pdf
capitulo-5-libro-contabilidad-costo-volumen-utilidad.pdf
cessarvargass23
 
Solicitud de cambio de un producto, a nivel empresarial.
Solicitud de cambio de un producto, a nivel empresarial.Solicitud de cambio de un producto, a nivel empresarial.
Solicitud de cambio de un producto, a nivel empresarial.
femayormisleidys
 
Exposicion Examen Final Arquitectura Empresarial CANVIA.pdf
Exposicion Examen Final Arquitectura Empresarial CANVIA.pdfExposicion Examen Final Arquitectura Empresarial CANVIA.pdf
Exposicion Examen Final Arquitectura Empresarial CANVIA.pdf
VictorBenjaminGomezS
 
BANRURAL S.A Case Study, Guatemala. INCAE Business Review, 2010.
BANRURAL S.A Case Study, Guatemala. INCAE Business Review, 2010.BANRURAL S.A Case Study, Guatemala. INCAE Business Review, 2010.
BANRURAL S.A Case Study, Guatemala. INCAE Business Review, 2010.
Anna Lucia Alfaro Dardón - Ana Lucía Alfaro
 
CATALOGO 2024 ABRATOOLS - ABRASIVOS Y MAQUINTARIA
CATALOGO 2024 ABRATOOLS - ABRASIVOS Y MAQUINTARIACATALOGO 2024 ABRATOOLS - ABRASIVOS Y MAQUINTARIA
CATALOGO 2024 ABRATOOLS - ABRASIVOS Y MAQUINTARIA
Fernando Tellado
 
EJEMPLO SOLICITUD CERTIFICADO DE INFORMES PREVIOS
EJEMPLO SOLICITUD CERTIFICADO DE INFORMES PREVIOSEJEMPLO SOLICITUD CERTIFICADO DE INFORMES PREVIOS
EJEMPLO SOLICITUD CERTIFICADO DE INFORMES PREVIOS
ArquitecturaClculoCe
 
SMEs as Backbone of the Economies, INCAE Business Review 2010
SMEs as Backbone of the Economies, INCAE Business Review 2010SMEs as Backbone of the Economies, INCAE Business Review 2010
SMEs as Backbone of the Economies, INCAE Business Review 2010
Anna Lucia Alfaro Dardón - Ana Lucía Alfaro
 
Karla_Meza_Catedra_Morazanica_TEC18NOV_CAP_3.pptx
Karla_Meza_Catedra_Morazanica_TEC18NOV_CAP_3.pptxKarla_Meza_Catedra_Morazanica_TEC18NOV_CAP_3.pptx
Karla_Meza_Catedra_Morazanica_TEC18NOV_CAP_3.pptx
LibreriaOrellana1
 
Trigonometria Plan-el mejor.pptxssssssss
Trigonometria Plan-el mejor.pptxssssssssTrigonometria Plan-el mejor.pptxssssssss
Trigonometria Plan-el mejor.pptxssssssss
QuerubinOlayamedina
 
FINANZAS_CAJA CUSCO PROYECO DE TESIS .pptx
FINANZAS_CAJA CUSCO PROYECO DE TESIS .pptxFINANZAS_CAJA CUSCO PROYECO DE TESIS .pptx
FINANZAS_CAJA CUSCO PROYECO DE TESIS .pptx
YOLISALLOPUMAINCA
 
Capacitación chatbot Wapi para enviar por whatsapp
Capacitación chatbot Wapi para enviar por whatsappCapacitación chatbot Wapi para enviar por whatsapp
Capacitación chatbot Wapi para enviar por whatsapp
acastropu
 
El Pitch Deck de Facebook que Facebook utilizó para levantar su ronda de semi...
El Pitch Deck de Facebook que Facebook utilizó para levantar su ronda de semi...El Pitch Deck de Facebook que Facebook utilizó para levantar su ronda de semi...
El Pitch Deck de Facebook que Facebook utilizó para levantar su ronda de semi...
dntstartups
 
Guía para hacer un Plan de Negocio para tu emprendimiento.pdf
Guía para hacer un Plan de Negocio para tu emprendimiento.pdfGuía para hacer un Plan de Negocio para tu emprendimiento.pdf
Guía para hacer un Plan de Negocio para tu emprendimiento.pdf
pppilarparedespampin
 
STEEPLE/PESTEL - Análisis de cada Factor
STEEPLE/PESTEL - Análisis de cada FactorSTEEPLE/PESTEL - Análisis de cada Factor
STEEPLE/PESTEL - Análisis de cada Factor
bauldecuentosec
 
Mario Mendoza Marichal Perspectivas Empresariales para México 2024 .pdf
Mario Mendoza Marichal  Perspectivas Empresariales para México 2024 .pdfMario Mendoza Marichal  Perspectivas Empresariales para México 2024 .pdf
Mario Mendoza Marichal Perspectivas Empresariales para México 2024 .pdf
Mario Mendoza Marichal
 
SESION N° 01.pptx GESTION PROYECTOS UCV 2024
SESION N° 01.pptx GESTION PROYECTOS UCV 2024SESION N° 01.pptx GESTION PROYECTOS UCV 2024
SESION N° 01.pptx GESTION PROYECTOS UCV 2024
auyawilly
 
Diseño Organizacional e Inteligencia Artificial
Diseño Organizacional e Inteligencia ArtificialDiseño Organizacional e Inteligencia Artificial
Diseño Organizacional e Inteligencia Artificial
Israel Alcazar
 
9° TEMA 5 - EVOLUCIÓN BIOLÓGICA Y GEOLÓGICA DE LA TIERRA (1).pdf
9° TEMA 5 - EVOLUCIÓN BIOLÓGICA Y GEOLÓGICA DE LA TIERRA (1).pdf9° TEMA 5 - EVOLUCIÓN BIOLÓGICA Y GEOLÓGICA DE LA TIERRA (1).pdf
9° TEMA 5 - EVOLUCIÓN BIOLÓGICA Y GEOLÓGICA DE LA TIERRA (1).pdf
erikamontano663
 
U1. C2. TIPOS DE INSTITUCIONES FINANCIERAS.pptx
U1. C2. TIPOS DE INSTITUCIONES FINANCIERAS.pptxU1. C2. TIPOS DE INSTITUCIONES FINANCIERAS.pptx
U1. C2. TIPOS DE INSTITUCIONES FINANCIERAS.pptx
fernfre15
 

Último (20)

plan contable empresarial para empresass
plan contable empresarial para empresassplan contable empresarial para empresass
plan contable empresarial para empresass
 
capitulo-5-libro-contabilidad-costo-volumen-utilidad.pdf
capitulo-5-libro-contabilidad-costo-volumen-utilidad.pdfcapitulo-5-libro-contabilidad-costo-volumen-utilidad.pdf
capitulo-5-libro-contabilidad-costo-volumen-utilidad.pdf
 
Solicitud de cambio de un producto, a nivel empresarial.
Solicitud de cambio de un producto, a nivel empresarial.Solicitud de cambio de un producto, a nivel empresarial.
Solicitud de cambio de un producto, a nivel empresarial.
 
Exposicion Examen Final Arquitectura Empresarial CANVIA.pdf
Exposicion Examen Final Arquitectura Empresarial CANVIA.pdfExposicion Examen Final Arquitectura Empresarial CANVIA.pdf
Exposicion Examen Final Arquitectura Empresarial CANVIA.pdf
 
BANRURAL S.A Case Study, Guatemala. INCAE Business Review, 2010.
BANRURAL S.A Case Study, Guatemala. INCAE Business Review, 2010.BANRURAL S.A Case Study, Guatemala. INCAE Business Review, 2010.
BANRURAL S.A Case Study, Guatemala. INCAE Business Review, 2010.
 
CATALOGO 2024 ABRATOOLS - ABRASIVOS Y MAQUINTARIA
CATALOGO 2024 ABRATOOLS - ABRASIVOS Y MAQUINTARIACATALOGO 2024 ABRATOOLS - ABRASIVOS Y MAQUINTARIA
CATALOGO 2024 ABRATOOLS - ABRASIVOS Y MAQUINTARIA
 
EJEMPLO SOLICITUD CERTIFICADO DE INFORMES PREVIOS
EJEMPLO SOLICITUD CERTIFICADO DE INFORMES PREVIOSEJEMPLO SOLICITUD CERTIFICADO DE INFORMES PREVIOS
EJEMPLO SOLICITUD CERTIFICADO DE INFORMES PREVIOS
 
SMEs as Backbone of the Economies, INCAE Business Review 2010
SMEs as Backbone of the Economies, INCAE Business Review 2010SMEs as Backbone of the Economies, INCAE Business Review 2010
SMEs as Backbone of the Economies, INCAE Business Review 2010
 
Karla_Meza_Catedra_Morazanica_TEC18NOV_CAP_3.pptx
Karla_Meza_Catedra_Morazanica_TEC18NOV_CAP_3.pptxKarla_Meza_Catedra_Morazanica_TEC18NOV_CAP_3.pptx
Karla_Meza_Catedra_Morazanica_TEC18NOV_CAP_3.pptx
 
Trigonometria Plan-el mejor.pptxssssssss
Trigonometria Plan-el mejor.pptxssssssssTrigonometria Plan-el mejor.pptxssssssss
Trigonometria Plan-el mejor.pptxssssssss
 
FINANZAS_CAJA CUSCO PROYECO DE TESIS .pptx
FINANZAS_CAJA CUSCO PROYECO DE TESIS .pptxFINANZAS_CAJA CUSCO PROYECO DE TESIS .pptx
FINANZAS_CAJA CUSCO PROYECO DE TESIS .pptx
 
Capacitación chatbot Wapi para enviar por whatsapp
Capacitación chatbot Wapi para enviar por whatsappCapacitación chatbot Wapi para enviar por whatsapp
Capacitación chatbot Wapi para enviar por whatsapp
 
El Pitch Deck de Facebook que Facebook utilizó para levantar su ronda de semi...
El Pitch Deck de Facebook que Facebook utilizó para levantar su ronda de semi...El Pitch Deck de Facebook que Facebook utilizó para levantar su ronda de semi...
El Pitch Deck de Facebook que Facebook utilizó para levantar su ronda de semi...
 
Guía para hacer un Plan de Negocio para tu emprendimiento.pdf
Guía para hacer un Plan de Negocio para tu emprendimiento.pdfGuía para hacer un Plan de Negocio para tu emprendimiento.pdf
Guía para hacer un Plan de Negocio para tu emprendimiento.pdf
 
STEEPLE/PESTEL - Análisis de cada Factor
STEEPLE/PESTEL - Análisis de cada FactorSTEEPLE/PESTEL - Análisis de cada Factor
STEEPLE/PESTEL - Análisis de cada Factor
 
Mario Mendoza Marichal Perspectivas Empresariales para México 2024 .pdf
Mario Mendoza Marichal  Perspectivas Empresariales para México 2024 .pdfMario Mendoza Marichal  Perspectivas Empresariales para México 2024 .pdf
Mario Mendoza Marichal Perspectivas Empresariales para México 2024 .pdf
 
SESION N° 01.pptx GESTION PROYECTOS UCV 2024
SESION N° 01.pptx GESTION PROYECTOS UCV 2024SESION N° 01.pptx GESTION PROYECTOS UCV 2024
SESION N° 01.pptx GESTION PROYECTOS UCV 2024
 
Diseño Organizacional e Inteligencia Artificial
Diseño Organizacional e Inteligencia ArtificialDiseño Organizacional e Inteligencia Artificial
Diseño Organizacional e Inteligencia Artificial
 
9° TEMA 5 - EVOLUCIÓN BIOLÓGICA Y GEOLÓGICA DE LA TIERRA (1).pdf
9° TEMA 5 - EVOLUCIÓN BIOLÓGICA Y GEOLÓGICA DE LA TIERRA (1).pdf9° TEMA 5 - EVOLUCIÓN BIOLÓGICA Y GEOLÓGICA DE LA TIERRA (1).pdf
9° TEMA 5 - EVOLUCIÓN BIOLÓGICA Y GEOLÓGICA DE LA TIERRA (1).pdf
 
U1. C2. TIPOS DE INSTITUCIONES FINANCIERAS.pptx
U1. C2. TIPOS DE INSTITUCIONES FINANCIERAS.pptxU1. C2. TIPOS DE INSTITUCIONES FINANCIERAS.pptx
U1. C2. TIPOS DE INSTITUCIONES FINANCIERAS.pptx
 

Apache ha muerto, Viva Lighttpd

  • 1. Apache ha muerto Viva LIGHTTPD! [email_address] * No creo realmente que el Apache haya muerto, pero si que ahora hay mas opciones, algunas mucho mas interesantes, como Lighty. El titulo de la presentacion es para provocar, nomas.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. 1 servidor HTTP, 3 servidores PHP FastCGI FastCGI FastCGI HTTP
  • 12.
  • 13. Un servidor por &quot;zona&quot; $HTTP[&quot;url&quot;] =~ &quot; ^/forum &quot; { proxy-core.protocol = &quot;fastcgi&quot; proxy-core.backends = ( &quot; 10.0.0.1:1000 &quot;) } $HTTP[&quot;url&quot;] =~ &quot; ^/torrents &quot; { proxy-core.protocol = &quot;fastcgi&quot; proxy-core.backends = ( &quot; 10.0.0.99:1000 &quot;) }
  • 14.
  • 15. Distribuyendo la carga $HTTP[&quot;url&quot;] =~ &quot;php$&quot; { proxy-core.protocol = &quot;fastcgi&quot; proxy-core.backends = ( &quot;10.0.0.1:1000&quot; ) } else $HTTP[&quot;url&quot;] =~ &quot;^/images/[0-4]/&quot; { proxy-core.protocol = &quot;http&quot; proxy-core.backends = ( &quot;10.0.0.2:80&quot; ) } else $HTTP[&quot;url&quot;] =~ &quot;^/images/[5-9]/&quot; { proxy-core.protocol = &quot;http&quot; proxy-core.backends = ( &quot;10.0.0.3:80&quot; ) } The web is a pipe!
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Un archivo al azar En PHP, PHP+X-Sendfile y LUA <?php header(&quot;Content-Type: image/png&quot;); print file_get_contents(&quot;imgs/&quot;.rand(0,9).&quot;.png&quot;); <?php header(&quot;Content-Type: image/png&quot;); header(&quot;X-Sendfile: &quot;.getcwd(). &quot;/imgs/&quot;.rand(0,9).&quot;.png&quot;); lighty.env[&quot;request.uri&quot;]=&quot;/imgs/&quot; .. math.random(9) .. &quot;.png&quot; return lighty.RESTART_REQUEST
  • 21.
  • 22.
  • 23. magnet: cache html Guardar el output HTML en el archivo temporal: <?php function cache_html(){ function write_html($text){ $info = stat($_SERVER[&quot;SCRIPT_FILENAME&quot;]); file_put_contents(&quot;/tmp/&quot;.$info['ino'].&quot;.html&quot;,$text); return false; } ob_start(&quot;write_html&quot;); }
  • 24. magnet: cache html Devolver el contenido del archivo temporal si existe y terminar la ejecucion (PHP): <?php function show_cached(){ $info = stat($_SERVER[&quot;SCRIPT_FILENAME&quot;]); $cache_file = &quot;/tmp/&quot;.$info['ino'].&quot;.html&quot;; if (file_exists($cache_file)){ print file_get_contents($cache_file); exit; } }
  • 25. magnet: cache html Devolver el contenido del archivo temporal si existe y terminar la ejecucion (LUA): info = lighty.stat(lighty.env[&quot;physical.path&quot;]) cache_path = &quot;/tmp/&quot;..info[&quot;st_ino&quot;]..&quot;.html&quot; cache_info = lighty.stat(cache_path) if (cache_info) then lighty.env[&quot;physical.path&quot;] = cache_path end
  • 26.
  • 27.