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

NGINXとApacheざっくり比較 - NGINX MeetUp #1 Lightning ...

NGINX Japan
November 14, 2018

NGINXとApacheざっくり比較 - NGINX MeetUp #1 Lightning Talks

NGINX Japan

November 14, 2018
Tweet

More Decks by NGINX Japan

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ 3 • ాลໜ໵ • NGINXࣾ ςΫχΧϧɾιϦϡʔγϣϯζɾΞʔΩςΫτ • ܦҢ ◦

    ΦʔϓϯιʔεɾWebܥͷϑϦʔϥϯεΤϯδχΞɿॳظWebͷԿͰ΋԰ ◦ ϚΠΫϩιϑτܥɾΤϯλʔϓϥΠζܥɿID؅ཧɾPowerShell ◦ ϞόΠϧͷΞϓϦͱσόΠε؅ཧɿCIɾMDM ◦ Webܥʹճؼɿઈࢍษڧத
  2. 20ੈل vs 21ੈل 6 • Apache HTTP Server ◦ 1995೥ొ৔

     2.4: 2012೥  ݱࡏ 2.4.37  ރΕ੾͍ͬͯΔʢ͍͍ҙຯͰʣ  ࠓޙ৽͍͠ػೳ௥Ճ͸ͳͦ͞͏ ◦ LAMPͷॏཁཁૉ ◦ Webʹඞཁͳ΋ͷશ෦  Webքͷsendmail? • NGINX ◦ 2002೥ొ৔ ◦ C10K໰୊ͷղܾ ◦ ଎͘ɺޮ཰Α͘ ◦ ϦόʔεϓϩΩγ΍Ωϟογϡ ϩʔυόϥϯεͳͲͷ ࠷ۙͷཁ੥ʹ࠷ॳ͔ΒରԠ  HTTPҎ֎ʹ΋ରԠ
  3. ύϑΥʔϚϯε 7 • ੩తίϯςϯπͰ͸nginx ͕໿2ഒ଎͍ (Wikipedia) ◦ 1000ಉ࣌઀ଓͰ͸nginx͕໿2.5ഒ଎͍ (eschrade.com) ◦

    512ಉ࣌઀ଓͰ͸nginx͕໿2ഒ଎͍ (speedemy) • ಈతίϯςϯπͰ͸΄΅ಉ଎ ◦ ΞϓϦଆ͕཯଎ ◦ ΩϟογϡͳͲΛ׆༻
  4. NGINX͸͍ܰʁ 8 • ݕূྫ (https://stackshare.io/stackups/apache-httpd-vs-nginx) ◦ Ubuntu 18.04, Apache 2.4.29

    (mpm_event), Nginx 1.14.0 ◦ Default settings, 1GB ram, 1 CPU ◦ wrk: -d 60 (duration of the test), -c 40 (concurrency), --latency (latency distribution) ◦ ੩తίϯςϯπ
  5. njs 9 • NGINXͷઃఆϑΝΠϧதͰ࢖͑Δɺ JavaScriptͷαϒηοτ • ࢖༻ྫ ◦ ΧελϜϩάϑΥʔϚοτ ◦

    ϩʔυόϥϯεͷಠࣗΞϧΰϦζϜ ◦ αϒϦΫΤετͷੜ੒ nginx.conf: js_include hello_world.js; location / { js_content hello; } hello_world.js: function hello(r) { r.return(200, "Hello world!"); } Advent ΧϨϯμʔʹॻ͜͏͔ͳ͊ɻɻɻ
  6. ΤίγεςϜ 10 • એ఻ʂ • NGINXʹ͸ձࣾ͋Γ ◦ nginx.org ʹ΋ྑ͍ޮՌ ◦

    ΤϯλʔϓϥΠζ޲͚ͷαϙʔτ ◦ NGINX Plus ͋Γ·͢ ◦ બ୒͢Δ҆৺