SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
Advanced nginx in Mercari
「nginx実践入門」出版記念!執筆者らが語る nginx Tech Talks
Masahiro Nagano
How to handle over 1,200,000 HTTPS Reqs/Min
Me
• Masahiro Nagano @kazeburo
• Mercari, inc.
• Principal Engineer, Site Reliability Engineering Team
• BASE, inc. Technical Advisor
Mercari
Your Friendly Mobile MarketPlace
JP US
Mercari KPI
DOWNLOAD
GMV
ITEMS
3100万DL(JP+US)
月間数十億円
1日数十万品以上
API Traffic
1,200,000 reqs/min
(HTTPS only)
nginx in mercari
©2011 Amazon Web Services LLC or its affiliates. All rights reserved.
Users Client Multimedia Corporate
data center
Trad
se
Mobile Client
AWS Management
Console
IAM Add-on Example:
IAM Add-on
Tasks (HIT) TaskTurk
ice Specific
©2011 Amazon Web Services LLC or its affiliates. All rights reserved.
User
Users
Client
Multimedia
Corporatedata center
Mobile Client
net
AWS Management
Console
IAM Add-on
Example:IAM Add-on
Requester
azon
W
eb Services LLC
or its affiliates. All rights reserved.
ser
Users
Client
Multim
edia
Corporate
data
center
Tradit
server
Mobile
Client
AW
S
Managem
ent
Console
IAM
Add-on
Exam
ple:
IAM
Add-on
ence
HIT)
Assignm
ent/
Task
W
orkers
L7 load balancer
Reverse Proxy TLS Terminator
Contents Distribution©2011
Am
azon
W
eb
Services LLC
or its affiliates. All rights reserve
Users
Client
M
ultim
edia
Corporate
data
center
Tradition
server
M
obile
Client
Internet
AW
S
M
anagem
ent
Console
IAM
Add-on
Exam
ple:
IAM
Add-on
m
ent/
Task
Requester
W
orkers
nginx Extension in mercari
• ngx_dynamic_upstream
• Operate upsteam servers Up/Down dynamically
• OpenResty (ngx_lua)
• More powerful L7 load balancer
• Application log collector
Agenda
• Continuous updating nginx
• TLS Optimization
• Automated TLS session ticket key updating
• SPDY to HTTP/2
Continuous updating nginx
Keep nginx the latest
• Use nginx mainline version
• stableは安定しているという意味ではなく新機能が追加さ
れず、バグ修正も緊急な修正を除いて行われないというこ
と。すべての新機能やバグ修正はmainlineにて行われるの
で結果的にmainlineが安定している

https://www.nginx.com/blog/nginx-1-6-1-7-released/
• nginxは無停止でのアップデートが可能
• Periodic OpenSSL vulnerability report 😓
nginx-build
• nginx builder command written in Go

https://github.com/cubicdaiya/nginx-build
• Automate download, configure and make
• Download OpenSSL, zlib and PCRE. build them
statically ( independent from OS’s library version)
• Support Tengine and OpenResty
nginx-build
$ EXPORT $VERSION=1.9.10
$ nginx-build 
-clear 
-d work 
-v $VERSION 
-c nginx-build-conf/configure 
-m nginx-build-conf/modules3rd.ini 
-zlib 
-zlibversion=1.2.8 
-verbose 
-pcre 
-pcreversion=8.38 
-openssl 
-opensslversion=1.0.2f 
$ cd work/$VERSION/nginx-$VERSION
$ sudo make install
TLS Optimization
TLS Optimization
• PFS - Perfect Forward Secrecy
• TTFB - Time To First Byte
Perfect Forward Secrecy
• Mozilla Wiki

https://wiki.mozilla.org/Security/Server_Side_TLS
• Mozilla SSL Configuration Generator

https://mozilla.github.io/server-side-tls/ssl-config-
generator/
• *最新の情報を参照し、プロダクション環境に投
入する前にテストを行ってください
TTFB
• TLS Session Cache
• TLS Session Tickets
• OCSP Stapling
• SSL buffer size
TLS Session Cache
• Server side session cache
• Client software does not matter
• nginx could’t share session cache between servers.
ssl_session_cache shared:SSL:120m;
ssl_session_timeout 5m;
CONS
PROS
TLS Session Cache
• OpenResty will support it?

https://twitter.com/agentzh/status/
686655229828403201
TLS Session Tickets
• Client Side Session Cache

(like a CookieStore)
• No need to share cache between servers
• It’s required share ssl_session_ticket_key file
• Client support required
ssl_session_tickets on;
ssl_session_ticket_key /path/to/ssl_session_ticket;
PROS
CONS
TLS Session Tickets
User Agent Session Tickets
Android 2.3.7 No
Android 4.0.4 YES
Android 5 YES
Chrome 47 YES
Firefox 42 YES
IE11/Win7 No
IE11/Win10 YES
Edge/Win10 YES
Safari 9/iOS9 No
Safari 9/MacOSX10.11 No
!!!!
!!!!
https://www.ssllabs.com/ssltest/clients.html
OCSP Stapling
https://wiki.mozilla.org/Security/Server_Side_TLS
Client required to checking the
revocation status. If OCSP
Responder is down, page load is
failed.
Server retrieves OCSP record,
caches it and servers it to client
directly. Fast!
OSCP Stapling
• All Android version don’t support yet
• iOS < 9 doesn’t support it
CONS
CONS
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /path/to/server.crt;
resolver 8.8.8.8 valid=30s;
resolver_timeout 5s;
TLS buffer size
• TLS record size. Default 16KB, it’s too large. That’s
effect to latency

https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/
ssl_buffer_size 1k;
Automated
TLS session tickets key
updating
TLS Session Tickets
• Should share ssl_session_ticket_key file between
servers
• Mozilla recommends replace it every day for
forward secrecy
• Previously we changed the key file almost every
month in manual operation😓
Update Tickets with Consul
• Inspired by Stretcher (fujiwara👍)
• Key_file is very small (48byte), It can store into a payload
of consul event
• We’re updating key_file twice a day by using Consul
Update Tickets with Consul
JOB
Consul
Servers
nginx
Consul
Agent
$ consul event 
-name=“ssl-session-ticket-refresh" 
$(openssl rand 48 | base64)
nginx
Consul
Agent
nginx
Consul
Agent
cat | jq -r '.Payload' | 
base64 -d | base64 -d 
> /path/to/ticket.key
service nginx reload
❶
❷ ❷ ❷
❸
SPDY to HTTP/2
SPDY is alive
Request to a webview
728
1,009,268
270,527
HTTP/1.1 SPDY HTTP2
SPDY to HTTP/2
• In Mobile App, transition to HTTP/2 from SPDY is not
so quickly
• Android 4.x, iOS 8...
• nginx dropped SPDY in 1.9.4, but we need to
transition gracefully in a few and more years
• We need a server that speak both HTTP/2 and SPDY
Tengine
Now we’re trying Tengine (at a previous slide)
cloudflare patch?
https://blog.cloudflare.com/introducing-http2/
End

Más contenido relacionado

La actualidad más candente

PFSなTLS通信を復号する
PFSなTLS通信を復号するPFSなTLS通信を復号する
PFSなTLS通信を復号する稔 小林
 
LINEのMySQL運用について 修正版
LINEのMySQL運用について 修正版LINEのMySQL運用について 修正版
LINEのMySQL運用について 修正版LINE Corporation
 
Linux女子部 firewalld徹底入門!
Linux女子部 firewalld徹底入門!Linux女子部 firewalld徹底入門!
Linux女子部 firewalld徹底入門!Etsuji Nakai
 
今話題のいろいろなコンテナランタイムを比較してみた
今話題のいろいろなコンテナランタイムを比較してみた今話題のいろいろなコンテナランタイムを比較してみた
今話題のいろいろなコンテナランタイムを比較してみたKohei Tokunaga
 
Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...
Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...
Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...Preferred Networks
 
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あうセキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あうShinodaYukihiro
 
20190919 よくご相談いただくセキュリティの質問と考え方
20190919 よくご相談いただくセキュリティの質問と考え方20190919 よくご相談いただくセキュリティの質問と考え方
20190919 よくご相談いただくセキュリティの質問と考え方Amazon Web Services Japan
 
Zabbixのパフォーマンスチューニング & インストール時の注意点
Zabbixのパフォーマンスチューニング & インストール時の注意点Zabbixのパフォーマンスチューニング & インストール時の注意点
Zabbixのパフォーマンスチューニング & インストール時の注意点Kodai Terashima
 
GKE に飛んでくるトラフィックを 自由自在に操る力 | 第 10 回 Google Cloud INSIDE Games & Apps Online
GKE に飛んでくるトラフィックを 自由自在に操る力 | 第 10 回 Google Cloud INSIDE Games & Apps OnlineGKE に飛んでくるトラフィックを 自由自在に操る力 | 第 10 回 Google Cloud INSIDE Games & Apps Online
GKE に飛んでくるトラフィックを 自由自在に操る力 | 第 10 回 Google Cloud INSIDE Games & Apps OnlineGoogle Cloud Platform - Japan
 
Securing Kafka
Securing Kafka Securing Kafka
Securing Kafka confluent
 
AWS Black Belt Online Seminar 2016 AWS Key Management Service
AWS Black Belt Online Seminar 2016 AWS Key Management Service AWS Black Belt Online Seminar 2016 AWS Key Management Service
AWS Black Belt Online Seminar 2016 AWS Key Management Service Amazon Web Services Japan
 
Ansible ではじめる ネットワーク自動化(Ansible 2.9版)
Ansible ではじめる ネットワーク自動化(Ansible 2.9版)Ansible ではじめる ネットワーク自動化(Ansible 2.9版)
Ansible ではじめる ネットワーク自動化(Ansible 2.9版)akira6592
 
Visualizing Kafka Security
Visualizing Kafka SecurityVisualizing Kafka Security
Visualizing Kafka SecurityDataWorks Summit
 
Ansible 2.10 と Collection
Ansible 2.10 と CollectionAnsible 2.10 と Collection
Ansible 2.10 と Collectionakira6592
 
DynamoDBの初心者に伝えたい初めて触るときの勘所
DynamoDBの初心者に伝えたい初めて触るときの勘所DynamoDBの初心者に伝えたい初めて触るときの勘所
DynamoDBの初心者に伝えたい初めて触るときの勘所Ryo Sasaki
 
PenTesterが知っている危ないAWS環境の共通点
PenTesterが知っている危ないAWS環境の共通点 PenTesterが知っている危ないAWS環境の共通点
PenTesterが知っている危ないAWS環境の共通点 zaki4649
 
犬でもわかる公開鍵暗号
犬でもわかる公開鍵暗号犬でもわかる公開鍵暗号
犬でもわかる公開鍵暗号akakou
 
さいきんの InnoDB Adaptive Flushing (仮)
さいきんの InnoDB Adaptive Flushing (仮)さいきんの InnoDB Adaptive Flushing (仮)
さいきんの InnoDB Adaptive Flushing (仮)Takanori Sejima
 

La actualidad más candente (20)

PFSなTLS通信を復号する
PFSなTLS通信を復号するPFSなTLS通信を復号する
PFSなTLS通信を復号する
 
LINEのMySQL運用について 修正版
LINEのMySQL運用について 修正版LINEのMySQL運用について 修正版
LINEのMySQL運用について 修正版
 
Linux女子部 firewalld徹底入門!
Linux女子部 firewalld徹底入門!Linux女子部 firewalld徹底入門!
Linux女子部 firewalld徹底入門!
 
今話題のいろいろなコンテナランタイムを比較してみた
今話題のいろいろなコンテナランタイムを比較してみた今話題のいろいろなコンテナランタイムを比較してみた
今話題のいろいろなコンテナランタイムを比較してみた
 
Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...
Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...
Kubernetes Service Account As Multi-Cloud Identity / Cloud Native Security Co...
 
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あうセキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
セキュリティの基本とAWSでのセキュリティ対策をフルコースで味あう
 
20190919 よくご相談いただくセキュリティの質問と考え方
20190919 よくご相談いただくセキュリティの質問と考え方20190919 よくご相談いただくセキュリティの質問と考え方
20190919 よくご相談いただくセキュリティの質問と考え方
 
NGINXをBFF (Backend for Frontend)として利用した話
NGINXをBFF (Backend for Frontend)として利用した話NGINXをBFF (Backend for Frontend)として利用した話
NGINXをBFF (Backend for Frontend)として利用した話
 
Zabbixのパフォーマンスチューニング & インストール時の注意点
Zabbixのパフォーマンスチューニング & インストール時の注意点Zabbixのパフォーマンスチューニング & インストール時の注意点
Zabbixのパフォーマンスチューニング & インストール時の注意点
 
GKE に飛んでくるトラフィックを 自由自在に操る力 | 第 10 回 Google Cloud INSIDE Games & Apps Online
GKE に飛んでくるトラフィックを 自由自在に操る力 | 第 10 回 Google Cloud INSIDE Games & Apps OnlineGKE に飛んでくるトラフィックを 自由自在に操る力 | 第 10 回 Google Cloud INSIDE Games & Apps Online
GKE に飛んでくるトラフィックを 自由自在に操る力 | 第 10 回 Google Cloud INSIDE Games & Apps Online
 
Securing Kafka
Securing Kafka Securing Kafka
Securing Kafka
 
AWS Black Belt Online Seminar 2016 AWS Key Management Service
AWS Black Belt Online Seminar 2016 AWS Key Management Service AWS Black Belt Online Seminar 2016 AWS Key Management Service
AWS Black Belt Online Seminar 2016 AWS Key Management Service
 
KeycloakでAPI認可に入門する
KeycloakでAPI認可に入門するKeycloakでAPI認可に入門する
KeycloakでAPI認可に入門する
 
Ansible ではじめる ネットワーク自動化(Ansible 2.9版)
Ansible ではじめる ネットワーク自動化(Ansible 2.9版)Ansible ではじめる ネットワーク自動化(Ansible 2.9版)
Ansible ではじめる ネットワーク自動化(Ansible 2.9版)
 
Visualizing Kafka Security
Visualizing Kafka SecurityVisualizing Kafka Security
Visualizing Kafka Security
 
Ansible 2.10 と Collection
Ansible 2.10 と CollectionAnsible 2.10 と Collection
Ansible 2.10 と Collection
 
DynamoDBの初心者に伝えたい初めて触るときの勘所
DynamoDBの初心者に伝えたい初めて触るときの勘所DynamoDBの初心者に伝えたい初めて触るときの勘所
DynamoDBの初心者に伝えたい初めて触るときの勘所
 
PenTesterが知っている危ないAWS環境の共通点
PenTesterが知っている危ないAWS環境の共通点 PenTesterが知っている危ないAWS環境の共通点
PenTesterが知っている危ないAWS環境の共通点
 
犬でもわかる公開鍵暗号
犬でもわかる公開鍵暗号犬でもわかる公開鍵暗号
犬でもわかる公開鍵暗号
 
さいきんの InnoDB Adaptive Flushing (仮)
さいきんの InnoDB Adaptive Flushing (仮)さいきんの InnoDB Adaptive Flushing (仮)
さいきんの InnoDB Adaptive Flushing (仮)
 

Similar a Advanced nginx in mercari - How to handle over 1,200,000 HTTPS Reqs/Min

AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 
E g innovations overview
E g innovations overviewE g innovations overview
E g innovations overviewNuno Alves
 
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Stamo Petkov
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...Amazon Web Services
 
Citirx Day 2013: Citrix Enterprise Mobility
Citirx Day 2013: Citrix Enterprise MobilityCitirx Day 2013: Citrix Enterprise Mobility
Citirx Day 2013: Citrix Enterprise MobilityDigicomp Academy AG
 
Choosing a Citrix Monitoring Strategy: Key Capabilities and Pitfalls to Avoid
Choosing a Citrix Monitoring Strategy: Key Capabilities and Pitfalls to AvoidChoosing a Citrix Monitoring Strategy: Key Capabilities and Pitfalls to Avoid
Choosing a Citrix Monitoring Strategy: Key Capabilities and Pitfalls to AvoideG Innovations
 
Architecting &Building Scalable Secure Web API
Architecting &Building Scalable Secure Web APIArchitecting &Building Scalable Secure Web API
Architecting &Building Scalable Secure Web APISHAKIL AKHTAR
 
KTC Profile-august
KTC Profile-augustKTC Profile-august
KTC Profile-augustKTC Host
 
Advantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingAdvantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingLisa Clarke
 
The Real World - Plugging the Enterprise Into It (nodejs)
The Real World - Plugging  the Enterprise Into It (nodejs)The Real World - Plugging  the Enterprise Into It (nodejs)
The Real World - Plugging the Enterprise Into It (nodejs)Aman Kohli
 
Adobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseAdobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseMike Slinn
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFAmazon Web Services
 
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Hacking Tizen : The OS of Everything - Nullcon Goa 2015Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Hacking Tizen : The OS of Everything - Nullcon Goa 2015Ajin Abraham
 
High Volume Payments using Mule
High Volume Payments using MuleHigh Volume Payments using Mule
High Volume Payments using MuleAdhish Pendharkar
 
HTTP - The Other Face Of Domino
HTTP - The Other Face Of DominoHTTP - The Other Face Of Domino
HTTP - The Other Face Of DominoGabriella Davis
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFAmazon Web Services
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFAmazon Web Services
 
SSL for SaaS Providers
SSL for SaaS ProvidersSSL for SaaS Providers
SSL for SaaS ProvidersCloudflare
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...MongoDB
 

Similar a Advanced nginx in mercari - How to handle over 1,200,000 HTTPS Reqs/Min (20)

AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
E g innovations overview
E g innovations overviewE g innovations overview
E g innovations overview
 
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
 
Citirx Day 2013: Citrix Enterprise Mobility
Citirx Day 2013: Citrix Enterprise MobilityCitirx Day 2013: Citrix Enterprise Mobility
Citirx Day 2013: Citrix Enterprise Mobility
 
56k.cloud training
56k.cloud training56k.cloud training
56k.cloud training
 
Choosing a Citrix Monitoring Strategy: Key Capabilities and Pitfalls to Avoid
Choosing a Citrix Monitoring Strategy: Key Capabilities and Pitfalls to AvoidChoosing a Citrix Monitoring Strategy: Key Capabilities and Pitfalls to Avoid
Choosing a Citrix Monitoring Strategy: Key Capabilities and Pitfalls to Avoid
 
Architecting &Building Scalable Secure Web API
Architecting &Building Scalable Secure Web APIArchitecting &Building Scalable Secure Web API
Architecting &Building Scalable Secure Web API
 
KTC Profile-august
KTC Profile-augustKTC Profile-august
KTC Profile-august
 
Advantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed HostingAdvantages of cPanel-based LiteSpeed Hosting
Advantages of cPanel-based LiteSpeed Hosting
 
The Real World - Plugging the Enterprise Into It (nodejs)
The Real World - Plugging  the Enterprise Into It (nodejs)The Real World - Plugging  the Enterprise Into It (nodejs)
The Real World - Plugging the Enterprise Into It (nodejs)
 
Adobe Flash Platform for the Enterprise
Adobe Flash Platform for the EnterpriseAdobe Flash Platform for the Enterprise
Adobe Flash Platform for the Enterprise
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
 
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Hacking Tizen : The OS of Everything - Nullcon Goa 2015Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
 
High Volume Payments using Mule
High Volume Payments using MuleHigh Volume Payments using Mule
High Volume Payments using Mule
 
HTTP - The Other Face Of Domino
HTTP - The Other Face Of DominoHTTP - The Other Face Of Domino
HTTP - The Other Face Of Domino
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
 
Secure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAFSecure Content Delivery Using Amazon CloudFront and AWS WAF
Secure Content Delivery Using Amazon CloudFront and AWS WAF
 
SSL for SaaS Providers
SSL for SaaS ProvidersSSL for SaaS Providers
SSL for SaaS Providers
 
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
Securing MongoDB to Serve an AWS-Based, Multi-Tenant, Security-Fanatic SaaS A...
 

Más de Masahiro Nagano

Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Masahiro Nagano
 
Big Master Data PHP BLT #1
Big Master Data PHP BLT #1Big Master Data PHP BLT #1
Big Master Data PHP BLT #1Masahiro Nagano
 
Stream processing in Mercari - Devsumi 2015 autumn LT
Stream processing in Mercari - Devsumi 2015 autumn LTStream processing in Mercari - Devsumi 2015 autumn LT
Stream processing in Mercari - Devsumi 2015 autumn LTMasahiro Nagano
 
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月Masahiro Nagano
 
ISUCONの勝ち方 YAPC::Asia Tokyo 2015
ISUCONの勝ち方 YAPC::Asia Tokyo 2015ISUCONの勝ち方 YAPC::Asia Tokyo 2015
ISUCONの勝ち方 YAPC::Asia Tokyo 2015Masahiro Nagano
 
Norikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LT
Norikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LTNorikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LT
Norikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LTMasahiro Nagano
 
メルカリでのNorikraの活用、 Mackerelを添えて
メルカリでのNorikraの活用、 Mackerelを添えてメルカリでのNorikraの活用、 Mackerelを添えて
メルカリでのNorikraの活用、 Mackerelを添えてMasahiro Nagano
 
Gazelle & CPAN modules for performance. Shibuya.pm Tech Talk #17 LT
Gazelle & CPAN modules for performance. Shibuya.pm Tech Talk #17 LTGazelle & CPAN modules for performance. Shibuya.pm Tech Talk #17 LT
Gazelle & CPAN modules for performance. Shibuya.pm Tech Talk #17 LTMasahiro Nagano
 
Mackerel & Norikra mackerel meetup #4 LT
Mackerel & Norikra mackerel meetup #4 LTMackerel & Norikra mackerel meetup #4 LT
Mackerel & Norikra mackerel meetup #4 LTMasahiro Nagano
 
ISUCON4 予選問題で(中略)、”my.cnf”に1行だけ足して予選通過ラインを突破するの術
ISUCON4 予選問題で(中略)、”my.cnf”に1行だけ足して予選通過ラインを突破するの術ISUCON4 予選問題で(中略)、”my.cnf”に1行だけ足して予選通過ラインを突破するの術
ISUCON4 予選問題で(中略)、”my.cnf”に1行だけ足して予選通過ラインを突破するの術Masahiro Nagano
 
Isucon makers casual talks
Isucon makers casual talksIsucon makers casual talks
Isucon makers casual talksMasahiro Nagano
 
blogサービスの全文検索の話 - #groonga を囲む夕べ
blogサービスの全文検索の話 - #groonga を囲む夕べblogサービスの全文検索の話 - #groonga を囲む夕べ
blogサービスの全文検索の話 - #groonga を囲む夕べMasahiro Nagano
 
Gazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmGazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmMasahiro Nagano
 
Dockerで遊んでみよっかー YAPC::Asia Tokyo 2014
Dockerで遊んでみよっかー YAPC::Asia Tokyo 2014Dockerで遊んでみよっかー YAPC::Asia Tokyo 2014
Dockerで遊んでみよっかー YAPC::Asia Tokyo 2014Masahiro Nagano
 
Web Framework Benchmarksと Perl の現状報告会 YAPC::Asia Tokyo 2014 LT
Web Framework Benchmarksと Perl の現状報告会 YAPC::Asia Tokyo 2014 LTWeb Framework Benchmarksと Perl の現状報告会 YAPC::Asia Tokyo 2014 LT
Web Framework Benchmarksと Perl の現状報告会 YAPC::Asia Tokyo 2014 LTMasahiro Nagano
 
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版Masahiro Nagano
 
Webアプリケーションの パフォーマンス向上のコツ 実践編
 Webアプリケーションの パフォーマンス向上のコツ 実践編 Webアプリケーションの パフォーマンス向上のコツ 実践編
Webアプリケーションの パフォーマンス向上のコツ 実践編Masahiro Nagano
 
Webアプリケーションの パフォーマンス向上のコツ 概要編
 Webアプリケーションの パフォーマンス向上のコツ 概要編 Webアプリケーションの パフォーマンス向上のコツ 概要編
Webアプリケーションの パフォーマンス向上のコツ 概要編Masahiro Nagano
 
Webアプリケーションとメモリ
WebアプリケーションとメモリWebアプリケーションとメモリ
WebアプリケーションとメモリMasahiro Nagano
 
最近作ったN個のCPANモジュール Yokohama.pm #10
最近作ったN個のCPANモジュール Yokohama.pm #10最近作ったN個のCPANモジュール Yokohama.pm #10
最近作ったN個のCPANモジュール Yokohama.pm #10Masahiro Nagano
 

Más de Masahiro Nagano (20)

Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015
 
Big Master Data PHP BLT #1
Big Master Data PHP BLT #1Big Master Data PHP BLT #1
Big Master Data PHP BLT #1
 
Stream processing in Mercari - Devsumi 2015 autumn LT
Stream processing in Mercari - Devsumi 2015 autumn LTStream processing in Mercari - Devsumi 2015 autumn LT
Stream processing in Mercari - Devsumi 2015 autumn LT
 
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
 
ISUCONの勝ち方 YAPC::Asia Tokyo 2015
ISUCONの勝ち方 YAPC::Asia Tokyo 2015ISUCONの勝ち方 YAPC::Asia Tokyo 2015
ISUCONの勝ち方 YAPC::Asia Tokyo 2015
 
Norikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LT
Norikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LTNorikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LT
Norikraで作るPHPの例外検知システム YAPC::Asia Tokyo 2015 LT
 
メルカリでのNorikraの活用、 Mackerelを添えて
メルカリでのNorikraの活用、 Mackerelを添えてメルカリでのNorikraの活用、 Mackerelを添えて
メルカリでのNorikraの活用、 Mackerelを添えて
 
Gazelle & CPAN modules for performance. Shibuya.pm Tech Talk #17 LT
Gazelle & CPAN modules for performance. Shibuya.pm Tech Talk #17 LTGazelle & CPAN modules for performance. Shibuya.pm Tech Talk #17 LT
Gazelle & CPAN modules for performance. Shibuya.pm Tech Talk #17 LT
 
Mackerel & Norikra mackerel meetup #4 LT
Mackerel & Norikra mackerel meetup #4 LTMackerel & Norikra mackerel meetup #4 LT
Mackerel & Norikra mackerel meetup #4 LT
 
ISUCON4 予選問題で(中略)、”my.cnf”に1行だけ足して予選通過ラインを突破するの術
ISUCON4 予選問題で(中略)、”my.cnf”に1行だけ足して予選通過ラインを突破するの術ISUCON4 予選問題で(中略)、”my.cnf”に1行だけ足して予選通過ラインを突破するの術
ISUCON4 予選問題で(中略)、”my.cnf”に1行だけ足して予選通過ラインを突破するの術
 
Isucon makers casual talks
Isucon makers casual talksIsucon makers casual talks
Isucon makers casual talks
 
blogサービスの全文検索の話 - #groonga を囲む夕べ
blogサービスの全文検索の話 - #groonga を囲む夕べblogサービスの全文検索の話 - #groonga を囲む夕べ
blogサービスの全文検索の話 - #groonga を囲む夕べ
 
Gazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapmGazelle - Plack Handler for performance freaks #yokohamapm
Gazelle - Plack Handler for performance freaks #yokohamapm
 
Dockerで遊んでみよっかー YAPC::Asia Tokyo 2014
Dockerで遊んでみよっかー YAPC::Asia Tokyo 2014Dockerで遊んでみよっかー YAPC::Asia Tokyo 2014
Dockerで遊んでみよっかー YAPC::Asia Tokyo 2014
 
Web Framework Benchmarksと Perl の現状報告会 YAPC::Asia Tokyo 2014 LT
Web Framework Benchmarksと Perl の現状報告会 YAPC::Asia Tokyo 2014 LTWeb Framework Benchmarksと Perl の現状報告会 YAPC::Asia Tokyo 2014 LT
Web Framework Benchmarksと Perl の現状報告会 YAPC::Asia Tokyo 2014 LT
 
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
 
Webアプリケーションの パフォーマンス向上のコツ 実践編
 Webアプリケーションの パフォーマンス向上のコツ 実践編 Webアプリケーションの パフォーマンス向上のコツ 実践編
Webアプリケーションの パフォーマンス向上のコツ 実践編
 
Webアプリケーションの パフォーマンス向上のコツ 概要編
 Webアプリケーションの パフォーマンス向上のコツ 概要編 Webアプリケーションの パフォーマンス向上のコツ 概要編
Webアプリケーションの パフォーマンス向上のコツ 概要編
 
Webアプリケーションとメモリ
WebアプリケーションとメモリWebアプリケーションとメモリ
Webアプリケーションとメモリ
 
最近作ったN個のCPANモジュール Yokohama.pm #10
最近作ったN個のCPANモジュール Yokohama.pm #10最近作ったN個のCPANモジュール Yokohama.pm #10
最近作ったN個のCPANモジュール Yokohama.pm #10
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

Advanced nginx in mercari - How to handle over 1,200,000 HTTPS Reqs/Min

  • 1. Advanced nginx in Mercari 「nginx実践入門」出版記念!執筆者らが語る nginx Tech Talks Masahiro Nagano How to handle over 1,200,000 HTTPS Reqs/Min
  • 2. Me • Masahiro Nagano @kazeburo • Mercari, inc. • Principal Engineer, Site Reliability Engineering Team • BASE, inc. Technical Advisor
  • 3. Mercari Your Friendly Mobile MarketPlace JP US
  • 6. nginx in mercari ©2011 Amazon Web Services LLC or its affiliates. All rights reserved. Users Client Multimedia Corporate data center Trad se Mobile Client AWS Management Console IAM Add-on Example: IAM Add-on Tasks (HIT) TaskTurk ice Specific ©2011 Amazon Web Services LLC or its affiliates. All rights reserved. User Users Client Multimedia Corporatedata center Mobile Client net AWS Management Console IAM Add-on Example:IAM Add-on Requester azon W eb Services LLC or its affiliates. All rights reserved. ser Users Client Multim edia Corporate data center Tradit server Mobile Client AW S Managem ent Console IAM Add-on Exam ple: IAM Add-on ence HIT) Assignm ent/ Task W orkers L7 load balancer Reverse Proxy TLS Terminator Contents Distribution©2011 Am azon W eb Services LLC or its affiliates. All rights reserve Users Client M ultim edia Corporate data center Tradition server M obile Client Internet AW S M anagem ent Console IAM Add-on Exam ple: IAM Add-on m ent/ Task Requester W orkers
  • 7. nginx Extension in mercari • ngx_dynamic_upstream • Operate upsteam servers Up/Down dynamically • OpenResty (ngx_lua) • More powerful L7 load balancer • Application log collector
  • 8. Agenda • Continuous updating nginx • TLS Optimization • Automated TLS session ticket key updating • SPDY to HTTP/2
  • 10. Keep nginx the latest • Use nginx mainline version • stableは安定しているという意味ではなく新機能が追加さ れず、バグ修正も緊急な修正を除いて行われないというこ と。すべての新機能やバグ修正はmainlineにて行われるの で結果的にmainlineが安定している
 https://www.nginx.com/blog/nginx-1-6-1-7-released/ • nginxは無停止でのアップデートが可能 • Periodic OpenSSL vulnerability report 😓
  • 11. nginx-build • nginx builder command written in Go
 https://github.com/cubicdaiya/nginx-build • Automate download, configure and make • Download OpenSSL, zlib and PCRE. build them statically ( independent from OS’s library version) • Support Tengine and OpenResty
  • 12. nginx-build $ EXPORT $VERSION=1.9.10 $ nginx-build -clear -d work -v $VERSION -c nginx-build-conf/configure -m nginx-build-conf/modules3rd.ini -zlib -zlibversion=1.2.8 -verbose -pcre -pcreversion=8.38 -openssl -opensslversion=1.0.2f $ cd work/$VERSION/nginx-$VERSION $ sudo make install
  • 14. TLS Optimization • PFS - Perfect Forward Secrecy • TTFB - Time To First Byte
  • 15. Perfect Forward Secrecy • Mozilla Wiki
 https://wiki.mozilla.org/Security/Server_Side_TLS • Mozilla SSL Configuration Generator
 https://mozilla.github.io/server-side-tls/ssl-config- generator/ • *最新の情報を参照し、プロダクション環境に投 入する前にテストを行ってください
  • 16. TTFB • TLS Session Cache • TLS Session Tickets • OCSP Stapling • SSL buffer size
  • 17. TLS Session Cache • Server side session cache • Client software does not matter • nginx could’t share session cache between servers. ssl_session_cache shared:SSL:120m; ssl_session_timeout 5m; CONS PROS
  • 18. TLS Session Cache • OpenResty will support it?
 https://twitter.com/agentzh/status/ 686655229828403201
  • 19. TLS Session Tickets • Client Side Session Cache
 (like a CookieStore) • No need to share cache between servers • It’s required share ssl_session_ticket_key file • Client support required ssl_session_tickets on; ssl_session_ticket_key /path/to/ssl_session_ticket; PROS CONS
  • 20. TLS Session Tickets User Agent Session Tickets Android 2.3.7 No Android 4.0.4 YES Android 5 YES Chrome 47 YES Firefox 42 YES IE11/Win7 No IE11/Win10 YES Edge/Win10 YES Safari 9/iOS9 No Safari 9/MacOSX10.11 No !!!! !!!! https://www.ssllabs.com/ssltest/clients.html
  • 21. OCSP Stapling https://wiki.mozilla.org/Security/Server_Side_TLS Client required to checking the revocation status. If OCSP Responder is down, page load is failed. Server retrieves OCSP record, caches it and servers it to client directly. Fast!
  • 22. OSCP Stapling • All Android version don’t support yet • iOS < 9 doesn’t support it CONS CONS ssl_stapling on; ssl_stapling_verify on; ssl_trusted_certificate /path/to/server.crt; resolver 8.8.8.8 valid=30s; resolver_timeout 5s;
  • 23. TLS buffer size • TLS record size. Default 16KB, it’s too large. That’s effect to latency
 https://www.igvita.com/2013/12/16/optimizing-nginx-tls-time-to-first-byte/ ssl_buffer_size 1k;
  • 25. TLS Session Tickets • Should share ssl_session_ticket_key file between servers • Mozilla recommends replace it every day for forward secrecy • Previously we changed the key file almost every month in manual operation😓
  • 26. Update Tickets with Consul • Inspired by Stretcher (fujiwara👍) • Key_file is very small (48byte), It can store into a payload of consul event • We’re updating key_file twice a day by using Consul
  • 27. Update Tickets with Consul JOB Consul Servers nginx Consul Agent $ consul event -name=“ssl-session-ticket-refresh" $(openssl rand 48 | base64) nginx Consul Agent nginx Consul Agent cat | jq -r '.Payload' | base64 -d | base64 -d > /path/to/ticket.key service nginx reload ❶ ❷ ❷ ❷ ❸
  • 29. SPDY is alive Request to a webview 728 1,009,268 270,527 HTTP/1.1 SPDY HTTP2
  • 30. SPDY to HTTP/2 • In Mobile App, transition to HTTP/2 from SPDY is not so quickly • Android 4.x, iOS 8... • nginx dropped SPDY in 1.9.4, but we need to transition gracefully in a few and more years • We need a server that speak both HTTP/2 and SPDY
  • 31. Tengine Now we’re trying Tengine (at a previous slide)
  • 33. End