2013 - igor sysoev - nginx: origen, evolución y futuro - php conference argentina
DESCRIPTION
PHP Conference Argentina 2013TRANSCRIPT
nginxorigins, evolution, future!
!
Igor Sysoev
origins• Apache 1.3 frontend: mod_proxy,
backend: mod_perl, and dedicated lightweight server for images and static files!
• mod_proxy: 8K buffer + sockets buffers,half-duplex mode, hack!
• mod_accel: acceleration, cache, content filters
origins• C10K: thttpd, boa, mathopd!
• non-scalable: select, poll!
• scalable: /dev/poll, kqueue, real time signals, epoll!
• portable, SMP
master process
worker process
clients
nginx
worker process
cache manager
cache loader
PHP/FastCGI
backend
heavy load environment• backend acceleration!
• full buffering of client upload!
• reloading whole configuration!
• no CGI support!
• no run-time host resolving
features• simple configuration!
• log rotation!
• reliable reconfiguration!
• online upgrade
evolution• 2002: start of development!
• 4 Oct 2004: version 0.1.0!
static, proxy, SSL!
!
!
evolution• 2002: start of development!
• 4 Oct 2004: version 0.1.0!
static, proxy, SSL!
!
!
evolution• 2002: start of development!
• 4 Oct 2004: version 0.1.0!
static, proxy, SSL!
• Jan 2005: FastCGI!
• Spring 2005: SSI!
• 2006: embedded Perl
evolution• 2008: XSLT and image filters!
• 2009: cache and AIO!
• 12 Apr 2011: version 1.0!
!
evolution• 2008: XSLT and image filters!
• 2009: cache and AIO!
• 12 Apr 2011: version 1.0!
!
evolution• 2008: XSLT and image filters!
• 2009: cache and AIO!
• 12 Apr 2011: version 1.0!
• Summer 2011: NGINX, Inc.!
• Spring 2013: WebSockets proxy and SPDY
future• asynchronous vs non-blocking
AIO vs non-blocking
• non-blocking IO: returns status immediately: complete, partial, not ready or failure!
• asynchronous IO: starts operation, callback is called on completion
AIO vs non-blocking
• non-blocking is easy, suitable for simple application, difficult for complex applications!
• asynchronous is more complex, but more suitable for complex applications
future• asynchronous vs non-blocking!
• queues, batching!
• epoll vs kqueue!
• multithreaded, auxiliary thread pools
master process
worker process
clients
nginx
worker process
cache manager
cache loader
PHP/FastCGI
backend
worker thread kqueue / epoll
worker thread kqueue / epoll
auxiliary thread
auxiliary thread
thread pool
worker process
dynamic future• almost all directives support variables!
• virtual servers can be reloaded separately!
• dynamically loadable modules!
• more SSL/TLS libraries: GnuTLS, CyaSSL, PolarSSL