2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina
Click here to load reader
-
Upload
php-conference-argentina -
Category
Technology
-
view
1.050 -
download
2
description
Transcript of 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina
![Page 1: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/1.jpg)
nginxorigins, evolution, future!
!
Igor Sysoev
![Page 2: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/2.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/3.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/4.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/5.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/6.jpg)
features• simple configuration!
• log rotation!
• reliable reconfiguration!
• online upgrade
![Page 7: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/7.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/8.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/9.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/10.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/11.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/12.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/13.jpg)
future• asynchronous vs non-blocking
![Page 14: 2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argentina](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/14.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/15.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/16.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/17.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/18.jpg)
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](https://reader038.fdocuments.in/reader038/viewer/2022100517/554bb748b4c9053a298b49f2/html5/thumbnails/19.jpg)
dynamic future• almost all directives support variables!
• virtual servers can be reloaded separately!
• dynamically loadable modules!
• more SSL/TLS libraries: GnuTLS, CyaSSL, PolarSSL