nginx
origins, evolution, future!
!

Igor Sysoev
origins
• Apache 1.3 frontend: mod_proxy,

backend: mod_perl, and dedicated lightweight
server for images and static files!...
origins
• C10K: thttpd, boa, mathopd!
• non-scalable: select, poll!
• scalable: /dev/poll, kqueue, real time signals,
epol...
nginx
clients

backend

master process
PHP/FastCGI
worker process
worker process
cache manager
cache loader
heavy load environment
• backend acceleration!
• full buffering of client upload!
• reloading whole configuration!
• no CGI...
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 200...
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.!
• ...
future
• asynchronous vs non-blocking
AIO vs non-blocking
• non-blocking IO: returns status immediately:
complete, partial, not ready or failure!
• asynchronous...
AIO vs non-blocking
• non-blocking is easy, suitable for simple
application, difficult for complex applications!
• asynchro...
future
• asynchronous vs non-blocking!
• queues, batching!
• epoll vs kqueue!
• multithreaded, auxiliary thread pools
nginx
clients

backend

master process
PHP/FastCGI
worker process
worker process
cache manager
cache loader
worker process
worker thread

kqueue / epoll

worker thread

kqueue / epoll

thread pool
auxiliary thread
auxiliary thread
dynamic future
• almost all directives support variables!
• virtual servers can be reloaded separately!
• dynamically load...
Upcoming SlideShare
Loading in …5
×

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

1,414 views
1,207 views

Published on

PHP Conference Argentina 2013

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,414
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

  1. 1. nginx origins, evolution, future! ! Igor Sysoev
  2. 2. 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
  3. 3. origins • C10K: thttpd, boa, mathopd! • non-scalable: select, poll! • scalable: /dev/poll, kqueue, real time signals, epoll! • portable, SMP
  4. 4. nginx clients backend master process PHP/FastCGI worker process worker process cache manager cache loader
  5. 5. heavy load environment • backend acceleration! • full buffering of client upload! • reloading whole configuration! • no CGI support! • no run-time host resolving
  6. 6. features • simple configuration! • log rotation! • reliable reconfiguration! • online upgrade
  7. 7. evolution • 2002: start of development! • 4 Oct 2004: version 0.1.0! static, proxy, SSL! ! !
  8. 8. evolution • 2002: start of development! • 4 Oct 2004: version 0.1.0! static, proxy, SSL! ! !
  9. 9. evolution • 2002: start of development! • 4 Oct 2004: version 0.1.0! static, proxy, SSL! • Jan 2005: FastCGI! • Spring 2005: SSI! • 2006: embedded Perl
  10. 10. evolution • 2008: XSLT and image filters! • 2009: cache and AIO! • 12 Apr 2011: version 1.0! !
  11. 11. evolution • 2008: XSLT and image filters! • 2009: cache and AIO! • 12 Apr 2011: version 1.0! !
  12. 12. 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
  13. 13. future • asynchronous vs non-blocking
  14. 14. 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
  15. 15. 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
  16. 16. future • asynchronous vs non-blocking! • queues, batching! • epoll vs kqueue! • multithreaded, auxiliary thread pools
  17. 17. nginx clients backend master process PHP/FastCGI worker process worker process cache manager cache loader
  18. 18. worker process worker thread kqueue / epoll worker thread kqueue / epoll thread pool auxiliary thread auxiliary thread
  19. 19. dynamic future • almost all directives support variables! • virtual servers can be reloaded separately! • dynamically loadable modules! • more SSL/TLS libraries: GnuTLS, CyaSSL, PolarSSL

×