Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Battle of the Stacks - All Things Open Edition

Battle of the Stacks - All Things Open Edition

When you first start as a developer all you care about is the code. As you progress and become more concerned with performance you begin to realize that there’s a whole world of possibilities and no clear indication of what works best.

In this presentation we’ll look at different combinations of web server technologies including Apache, NGINX, HHVM, PHP-FPM, and more, then we'll run load tests on each one of them in a head to head competition to find out which one is the Last Stack Standing.

This is the updated version of the BoS presentation. Same format as before, but updated to include more technologies and better tests.

Nic Rosental

October 23, 2014
Tweet

More Decks by Nic Rosental

Other Decks in Technology

Transcript

  1. Battle of the Stacks by Nic Rosental! @nicdev Image by

    Cosmopolitan of Las Vegas https://www.flickr.com/photos/thecosmopolitan/
  2. ! ! ! noun noun: stack; plural noun: stacks 1.

    a pile of objects, typically one that is neatly arranged. "a stack of boxes" synonyms: heap, pile, mound, mountain, pyramid, tower "a stack of boxes" informal a large quantity of something. "there's stacks of work for me now" a rectangular or cylindrical pile of hay or straw or of grain in sheaf. synonyms: haystack, rick, hayrick, mow, shock, haycock; datedcock "a stack of hay" a vertical arrangement of stereo or guitar amplification equipment. a number of aircraft flying in circles at different altitudes around the same point while waiting for permission to land at an airport. a pyramidal group of rifles. units of shelving in part of a library, used to store books compactly. plural noun: the stacks COMPUTING a set of storage locations that store data in such a way that the most recently stored item is the first to be retrieved. 2. a chimney, especially one on a factory, or a vertical exhaust pipe on a vehicle. synonyms: chimney, smokestack, funnel, exhaust pipe a column of rock standing in the sea, remaining after erosion of cliffs. noun: sea stack; plural noun: sea stacks Stacks Image by K.G.23 https://www.flickr.com/photos/kg-23/12846731134
  3. The components that make up your application. From the web

    server software all the way to the code. Image by Juhan Sonin https://www.flickr.com/photos/juhansonin/
  4. LAMP Stack! Apache 2.4 Worker +! PHP-FPM Image by Image

    by Peter Miller https://www.flickr.com/photos/sumaryanto-bronto/
  5. LAMP Stack! Apache 2.4 Event +! PHP-FPM Image by Arne

    Halvorsen https://www.flickr.com/photos/arne-halvorsen/
  6. HHVM + Apache 2.4! HHVM + NGINX Image by Michael

    Coté https://www.flickr.com/photos/cote/
  7. Each stack gets paired against another stack randomly in a

    playoff format.! ! Each stack gets a vanilla installation of WordPress to be used as target.! ! Each stack is tested using Loader.io.! ! The stack with better response time moves on to the next round.! ! Each rounds’ test is progressively harder than the last.! ! The winner of the third round will be crowned Last Stack Standing
  8. Apache 2.2 Prefork Apache 2.4 Worker + FPM HHVM +

    NGINX LAMP Apache 2.4 Event + FPM Lighty + FPM LEMP LAMP Apache 2.4 Prefork HHVM + Apache 2.4 60 clients/60 seconds
  9. LAMP Apache 2.2 Prefork! ! Vs.! ! LAMP Apache 2.4

    Worker + FPM http://ldr.io/1ogrzVi http://ldr.io/ZI8Sya
  10. LAMP Apache 2.4 Worker + FPM LAMP Apache 2.2 Prefork

    Response time: 163ms Response time: 60ms
  11. HHVM + NGINX! ! vs! ! LAMP Apache 2.4 Event

    + FPM http://ldr.io/ZzETbj http://ldr.io/1nu476f
  12. Lighty + FPM! ! vs! ! LEMP (NGINX + FPM)!

    http://ldr.io/1ogzbau http://ldr.io/1y3bjqM
  13. LAMP Apache 2.4 Prefork! ! vs! ! HHVM + Apache

    2.4! ! http://ldr.io/1DjdQAj http://ldr.io/ZzKpKX
  14. LAMP Apache 2.4 Worker + FPM HHVM + NGINX HHVM

    + Apache 2.4 LEMP 120 clients/60 seconds
  15. LAMP Apache 2.4 Worker + FPM! ! vs! ! HHVM

    + NGINX! ! http://ldr.io/1sRdwW8 http://ldr.io/1nuaKpk
  16. HHVM + NGINX! ! vs! ! HHVM + Apache 2.4!

    ! http://ldr.io/1ogvD7X http://ldr.io/1ogD7b3