2013 - igor sysoev - nginx: origen, evolución y futuro - php conference argentina

19

Click here to load reader

Upload: php-conference-argentina

Post on 08-May-2015

1.050 views

Category:

Technology


2 download

DESCRIPTION

PHP Conference Argentina 2013

TRANSCRIPT

Page 1: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

nginxorigins, evolution, future!

!

Igor Sysoev

Page 2: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

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

Page 3: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

origins• C10K: thttpd, boa, mathopd!

• non-scalable: select, poll!

• scalable: /dev/poll, kqueue, real time signals, epoll!

• portable, SMP

Page 4: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

master process

worker process

clients

nginx

worker process

cache manager

cache loader

PHP/FastCGI

backend

Page 5: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

heavy load environment• backend acceleration!

• full buffering of client upload!

• reloading whole configuration!

• no CGI support!

• no run-time host resolving

Page 6: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

features• simple configuration!

• log rotation!

• reliable reconfiguration!

• online upgrade

Page 7: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

evolution• 2002: start of development!

• 4 Oct 2004: version 0.1.0!

static, proxy, SSL!

!

!

Page 8: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

evolution• 2002: start of development!

• 4 Oct 2004: version 0.1.0!

static, proxy, SSL!

!

!

Page 9: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

evolution• 2002: start of development!

• 4 Oct 2004: version 0.1.0!

static, proxy, SSL!

• Jan 2005: FastCGI!

• Spring 2005: SSI!

• 2006: embedded Perl

Page 10: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

evolution• 2008: XSLT and image filters!

• 2009: cache and AIO!

• 12 Apr 2011: version 1.0!

!

Page 11: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

evolution• 2008: XSLT and image filters!

• 2009: cache and AIO!

• 12 Apr 2011: version 1.0!

!

Page 12: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

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

Page 13: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

future• asynchronous vs non-blocking

Page 14: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

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

Page 15: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

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

Page 16: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

future• asynchronous vs non-blocking!

• queues, batching!

• epoll vs kqueue!

• multithreaded, auxiliary thread pools

Page 17: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

master process

worker process

clients

nginx

worker process

cache manager

cache loader

PHP/FastCGI

backend

Page 18: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

worker thread kqueue / epoll

worker thread kqueue / epoll

auxiliary thread

auxiliary thread

thread pool

worker process

Page 19: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina

dynamic future• almost all directives support variables!

• virtual servers can be reloaded separately!

• dynamically loadable modules!

• more SSL/TLS libraries: GnuTLS, CyaSSL, PolarSSL