If you can't read please download the document
Upload
perrin-harkins
View
7.621
Download
2
Embed Size (px)
DESCRIPTION
This talk was presented at OSCON 2009 and YAPC::NA 2009. The choices discussed here are still relevant, although Plack has opened up some new options. For a more up-to-date take on this material I would recommend Tatsuhiko Miyagawa's most recent Plack/PSGI talks.
Citation preview
2. This used to be an easy decision
3. CGI, or NSAPI if you enjoy core dumps 4. Server-side development matured, and it stayed easy
5. mod_perl became the way to run Perl 6. FastCGI was looking peaky
7. Then two things happened
8. Thanks, Ruby! Non-blocking I/O became fashionable
9. Lighttpd 10. Nginx 11. Now we have many choices
12. Lighttpd 13. Nginx 14. Squid 15. Perlbal 16. Varnish
17. HTTP 18. SCGI 19. FastCGI
20. Daemons are managed by the web server or an external process 21. Has hooks for auth, logging, and filtering, but not always implemented and rarely used 22. HTTP
23. SCGI
24. Stealing good ideas from Python 25. Simpler than FastCGI, so theoretically could be faster 26. The graveyard of alternative Perl daemons
27. PersistentPerl 28. Both replace the #! line and daemonize your program 29. Biases
30. Member of Apache Software Foundation Don't believe a word I say! 31. Apache 2.2 mod_proxy + mod_perl
32. Backend apache runs prefork MPM 33. All popular apache modules (mod_ssl, mod_rewrite, mod_security, mod_deflate, caching, auth) are available 34. mod_proxy_balancer provides load balancing 35. Apache 2.2 mod_fastcgi
36. As with mod_proxy, all popular apache modules are available 37. Three poorly-named configurations:
38. Dynamic starts a new proc every time it gets a request up to a configured limit 39. Standalone sends requests to daemon you start 40. Apache 2.2 mod_fastcgi
Seamless restart for code upgrades in standalone mode
41. Could get close with two mod_perl backends, but not simple 42. Lighttpd mod_fastcgi
43. Supports static and standalone FastCGI 44. Supports Authorizer role 45. Solid selection of modules with equivalents of most popular apache ones 46. Same restart advantages as FastCGI on Apache 47. Load balancing across FastCGI daemons 48. Lighttpd mod_scgi
49. Sketchy docs 50. nginx FastCGI
51. Supports standalone FastCGI only 52. Does not support Authorizer role 53. Good module selection 54. Same restart advantages 55. nginx proxy + mod_perl
56. What about running naked mod_perl?
57. Buffering for slow clients 58. Keep-Alive 59. Benchmark methodology
60. Returns 35K of HTML (perl.com homepage) Brief run of ab (Apache Bench) with intended concurrency to warm up server 61. ab tests at concurrency of 10, 50, 150, 200 62. General findings
63. Worked better with Lighttpd FastCGI standalone mode is unusable on Lighttpd
SCGI Perl implementations incomplete 64. Benchmark results 65. Not really apples to apples
66. Filters on non-perl content (PHP, etc.) 67. Customize server and request phases 68. Replace HTTP with your own protocol
69. Thanks! And please help me addmore servers...