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

NGINX Plusのご紹介 - Red Hat Forum Tokyo 2018

NGINX Japan
November 08, 2018

NGINX Plusのご紹介 - Red Hat Forum Tokyo 2018

NGINX Japan

November 08, 2018
Tweet

More Decks by NGINX Japan

Other Decks in Technology

Transcript

  1. NGINXࣾ • ೥ʹઃཱɺ೥ʹNGINX 1MVTͷॳظϦϦʔε ೥044൛ॳظϦϦʔε • ສҎ্ͷ΢ΣϒαΠτ • ΤϯλʔϓϥΠζιϑτ΢ΣΞۀքͷϦʔμʔͷϕϯνϟʔΩϟϐλϧͷࢧԉ •

    αϯϑϥϯγείɺϩϯυϯɺίʔΫɺγϯΨϙʔϧɺγυχʔɺϞεΫϫɺ౦ژͷΦϑΟε • ࣾҎ্ͷސ٬ • ਓҎ্ͷैۀһ
  2. NGINX Unit NGINX ͔Βͷ৽͍͠ಈతͳWebͱΞϓϦ έʔγϣϯɾαʔόʔɻΦʔϓϯιʔεɺ ෳ਺ͷݴޠͷαϙʔτɺ͓Αͼಈతͳ REST API ओಋͷߏ੒ɻ NGINX

    Plus ϩʔυόϥϯαʔɺWebαʔόʔɺίϯςϯ πΩϟογϡΛؚΉ།ҰͷΦʔϧΠϯϫϯι ϦϡʔγϣϯɻίετΛ࡟ݮ͠ͳ͕ΒɺΞʔ ΩςΫνϟΛ؆ૉԽ͠·͢ɻ ੡඼ NGINX Controller NGINX PlusͷͨΊͷूத؂ࢹ͓Αͼ؅ཧɻ ୯Ұͷඒ͍͠ΠϯλʔϑΣΠεΛ࢖༻ͯ͠ɺ Ծ૝ϩʔυόϥϯαʔΛల։͠·͢ɻ NGINX WAF Φʔϓϯιʔεͷ WebΞϓϦέʔγϣϯϑΝ ΠΞ΢Υʔϧ (WAF)SQL ΠϯδΣΫγϣϯɺ LFIRFI͓ΑͼͦͷଞͷϨΠϠ7߈ܸΛ๷ ޚ͠·͢ɻ Powered by ModSecurity.
  3. NGINX ΞϓϦέʔγϣϯ ϓϥοτϑΥʔϜ ϩʔυόϥϯαɺAPI ήʔτ΢ΣΠɺ͓Αͼ αʔϏεϝογϡΛ୯Ұ ͷϞδϡϥʔԽϓϥοτ ϑΥʔϜʹ౷߹͢Δ͜ͱ ʹΑΓɺഒͷ؆ૉԽ ͱ

    ͷίετ࡟ݮΛ ࣮ݱ͢Δۀք།Ұͷι Ϧϡʔγϣϯ ύϑΥʔϚϯε ஄ྗੑ ηΩϡϦςΟ ϩʔυόϥϯαʔ API  αʔϏεϝογϡ
  4. ࠷৽Խ ϨΨγʔΞϓϦͱϚΠΫϩαʔ ϏεΛαϙʔτ͠ͳ͕Βɺ ࣗ෼ͷϖʔεͰΞϓϦΛ ࠷৽ԽͰ͖·͢ ؆ૉԽ ϞμϯͳΞϓϦΛ؆ૉԽ͠ɺ ϚϧνΫϥ΢υͷҠ২ੑΛ ఏڙ͠·͢ NGINX:

    ύϑΥʔϚϯε޲্͚ͩͰ͸ͳ͘ɺ ෳࡶ͞Λܰݮ͠·͢ɻ 12 ੜ࢈ੑ ΠϯϑϥετϥΫνϟ͓Αͼ ΞϓϦέʔγϣϯνʔϜؒͰ γʔϜϨεʹಈ࡞͠·͢
  5. NGINX Plusͱ͸ • ΞϓϦέʔγϣϯͷఏڙʹؔ͢ΔશͯΛΧόʔ ◦ ϩʔυόϥϯαʔ ◦ ίϯςϯπΩϟογϡ ◦ Web

    αʔόʔ ◦ ηΩϡϦςΟίϯτϩʔϧ ◦ ಈతϞδϡʔϧ ◦ ؂ࢹ ◦ ߴՄ༻ੑ (HA) ◦ Kubernetes Ingress controller ◦ ϓϩάϥϚϏϦςΟ
  6. ౷߹ͱ؆ૉԽ Web ΞϓϦέʔγϣϯ ϑΝΠΞ΢Υʔϧ Web Ωϟογϡ ωοτϫʔΫ ϑΝΠΞ΢Υʔϧ ϩʔυόϥϯαʔ SSL

    ϦόʔεϓϩΩγ ೝূ ήʔτ΢ΣΠ API ήʔτ΢ΣΠ ΞϓϦέʔγϣϯ <··> <··>
  7. NGINX Plus ͱϚΠΫϩαʔϏε • NGINX ͸ϚΠΫϩαʔϏεʹ ର͠ҎԼΛఏڙ ◦ ઀ଓ ◦

    αʔϏεఏڙ ◦ ೝূ ◦ ηΩϡϦςΟ ◦ Ωϟογϡ ◦ ෛՙ෼ࢄ ◦ εέʔϦϯά
  8. ͳͥ NGINX? NGINX ͸ϚΠΫϩαʔϏεΛݱ࣮ʹ ݱࡏར༻͞Ε͍ͯΔσʔλϓϨʔϯιϦϡʔγϣϯ • 400ສɿNGINXΠϯελϯε͕ϓϩμΫγϣϯͷϚΠΫϩαʔϏεͰՔಇதɻ* • 10ԯճɿNGINX ެࣜ

    DockerHub Πϝʔδͷϓϧ • ߴՄ༻ੑίϯςφτϥϑΟοΫ؅ཧͷͨΊͷ NGINX Plus Dockerfile • ඦສճɿNGINX Kubernetes Ingress Controllerͷϓϧ • 250ࣾɿNGINXΛϓϩμΫγϣϯͷϚΠΫϩαʔϏεͰ࢖༻த* • NGINX Plus: ίϯςφ಺ͰωΠςΟϒʹΞϓϦέʔγϣϯαʔϏεΛఏڙ • NGINX Controller: ׬શͳ؂ࢹ͓Αͼ؅ཧίϯςφϓϥοτϑΥʔϜ * Source: Internal customer data and surveys
  9. ಈతͳ E-W ϧʔςΟϯά: αʔϏεͷݕग़ • ͜Μͳͱ͖ʹඞཁ: ◦ ৽͍͠αʔϏε͕௥Ճ͞Εͨ ◦ طଘͷαʔϏεͷΠϯελϯε͕௥Ճ͞Εͨ

    • ϓϩΩγ͕ߏ੒͞ΕΔτϦΨʔ: ◦ Ansible Roles ◦ Consul templates ◦ DNS A, SRV Ϩίʔυ ◦ AWS Autoscaling άϧʔϓ ◦ Kubernetes (kube-dns) Ingress and Service-to- Service
  10. NGINX αΠυΧʔ: ηΩϡΞͰߴ଎ͳαʔϏεؒτϥϑΟοΫ • ηΩϡΞ ◦ αʔϏεؒͷSSL/TLS௨৴ ◦ NGINX Λܦ༝͠ͳ͍

    ௚઀ύεͷϧʔςΟϯάͳ͠ ◦ αʔϏεϨδετϦ lsource of truth” ◦ ΞϓϦ͝ͱͷೝূͱΫϨʔϜ੍ޚʹ JWT • ࠷దԽ ◦ SSL keepalive, ηοτΞοϓίετͷ࡟ݮ ◦ αʔϏεؒͷτϥϑΟοΫྔௐ੔ ◦ Many-to-many ίΞͱϦόʔεϓϩΩγͷ ΞʔΩςΫνϟ
  11. ࣍ͷεςοϓ: αʔϏεϝογϡͷΦʔέετϨʔγϣϯ • ෼ࢄαʔϏεؒͷ௨৴Λߴ଎ɺߴ৴ པɺ͓ΑͼηΩϡΞʹ͢Δωοτ ϫʔΫ૚ • සൟͳαʔϏεมߋʹରͯ͠΋ɺ ωοτϫʔΫ௨৴ͷ৴པੑΛ֬อ •

    αʔϏε͸ϝογϡΛҙࣝ͢Δඞཁ ͸ͳ͘ɺσʔλͱίϯτϩʔϧϓ Ϩʔϯͷ੍ޚΛ෼཭ αʔϏεϝογϡ ίϯτϩʔϧϓϨʔϯ ϓϥοτϑΥʔϜͷΦʔέετϨʔγϣϯ (K8s, Docker, EKS, etc) αʔϏεϝογϡ σʔλϓϨʔϯ
  12. NGINX Plus: API ήʔτ΢ΣΠ NGINX PlusAPI  • API ϧʔςΟϯά

    ◦ URL Ϛοϐϯά ◦ աෛՙอޢ • ೝূ ◦ API Ωʔ ◦ JWT/JWK ◦ SSL/MASSL Everywhere • ෼ੳͱ؂ࠪ ◦ ϦΫΤετͷτϨʔε • ࠷దԽ ◦ ΞοϓετϦʔϜ API ΫϥελϦϯά
  13. NGINX Plus - Kubernetes Ingress Controller NGINX PlusΛೖΓޱͱͯ͠ KubernetesΞϓϦέʔγϣϯΛ࡞੒ :

    • ߴ౓ͳෛՙ෼ࢄͱSSL/TLS ऴ୺ • WebSocket ͱ HTTP/2 ͷαϙʔτ • ϦΫΤετ͕ΞϓϦέʔγϣϯʹసૹ͞ΕΔ લʹURI ॻ͖׵͑ • ಈతͳ࠶ߏ੒ • Session persistence • JWT authentication • Prometheusͷαϙʔτ • 24x7 αϙʔτ https://github.com/nginxinc/kubernetes-ingress
  14. ؆୯Ͱ౷߹͞Εͨߏ੒ 1. apiVersion: extensions/v1beta1 2. kind: Ingress 3. metadata: 4.

    name: cafe-ingress 5. spec: 6. tls: 7. - hosts: 8. - cafe.example.com 9. secretName: cafe-secret 10. rules: 11. - host: cafe.example.com 12. http: 13. paths: 14. - path: /tea 15. backend: 16. serviceName: tea-svc 17. servicePort: 80 18. - path: /coffee 19. backend: 20. serviceName: coffee-svc 21. servicePort: 80
  15. ·ͱΊ 40 • ࣗࣾͷWebγεςϜ͕ෳࡶʹͳΓ͍͗ͯ͢Δ ◦ → NGINX Plus! • ϩʔυόϥϯαʔͷϋʔυ΢ΣΞͷߋ৽࣌ظʹདྷ͍ͯΔ

    ◦ → NGINX Plus! • APIήʔτ΢ΣΠ΍αʔϏεϝογϡΛݕ౼த ◦ → NGINX Plus! ϑϦʔτϥΠΞϧ͸ ͪ͜Β͔Β