SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
Varnish Squid
          w/	
  puppet	
  
               @ar1	
  
§                   	
                	
 
§  Debian	
                            	
  
§  Amazon	
  Web	
  Services                  	
  
      ú  Solutions	
  Architect	
  
      ú 
LoadBalance:	
     HighSpeed-­‐
    LVS	
             Cache	
  
  HAProxy	
  
(          )	
  
    	
  
 

       	
  
 
              !	
  
       	
  
 
Cache	
  
                                  Shareing	
  
LoadBalance:	
     HighSpeed-­‐    Sibling	
  
    LVS	
             Cache	
  
  HAProxy	
  
Request URI test-­‐a.example.jp   	
  
                           	
  




    varnish    cache       	
  




                       cache      squid   	
  
squid           cache       	
  




        cache     sibling          	
  




                                          HTTPD 	
  
Config:	
  squid	
  
[sibling.conf]	
  cache_peer	
  10.2.1.26	
  sibling	
  80	
  3130	
  

[squid.conf]	
  
http_port	
  8801	
  accel	
  defaultsite=test-­‐a-­‐origin.example.jp	
  
cache_peer	
  test-­‐a-­‐origin.example.jp	
  parent	
  80	
  0	
  originserver	
  name=test-­‐a-­‐origin_example_jp	
  
acl	
  test-­‐a-­‐origin_example_jp	
  dstdomain	
  test-­‐a-­‐origin.example.jp	
  
http_access	
  allow	
  test-­‐a-­‐origin_example_jp	
  
cache_peer_access	
  test-­‐a-­‐origin_example_jp	
  allow	
  test-­‐a-­‐origin_example_jp	
  
cache_peer_access	
  test-­‐a-­‐origin_example_jp	
  deny	
  all	
  
http_port	
  8802	
  accel	
  defaultsite=test-­‐k.example.jp	
  
cache_peer	
  test-­‐k.example.jp	
  parent	
  80	
  0	
  originserver	
  name=test-­‐k_example_jp	
  
acl	
  test-­‐k_example_jp	
  dstdomain	
  test-­‐k.example.jp	
  
http_access	
  allow	
  test-­‐k_example_jp	
  
cache_peer_access	
  test-­‐k_example_jp	
  allow	
  test-­‐k_example_jp	
  
cache_peer_access	
  test-­‐k_example_jp	
  deny	
  all	
  
http_port	
  8803	
  accel	
  defaultsite=test-­‐a.example.jp	
  
cache_peer	
  test-­‐a.example.jp	
  parent	
  80	
  0	
  originserver	
  name=test-­‐a_example_jp	
  
acl	
  test-­‐a_example_jp	
  dstdomain	
  test-­‐a.example.jp	
  
http_access	
  allow	
  test-­‐a_example_jp	
  
cache_peer_access	
  test-­‐a_example_jp	
  allow	
  test-­‐a_example_jp	
  
cache_peer_access	
  test-­‐a_example_jp	
  deny	
  all	
  
	
  
Config:	
  varnish	
  
sub	
  vcl_recv	
  {	
                                                                                                     backend	
  proxy5_test_a_origin_example_jp	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  if	
  (req.http.If-­‐Modified-­‐Since)	
  {	
                                               	
  	
  .host	
  =	
  "10.2.1.26";	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  error	
  304;	
                                            	
  	
  .port	
  =	
  "8801";	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
                                                                                        	
  	
  .connect_timeout	
  =	
  30ms;	
  
	
  	
  	
  	
  	
  	
  	
  	
  if	
  (req.http.host	
  ==	
  "test-­‐a-­‐origin.example.jp"){	
                           }	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  set	
  req.backend	
  =	
  test_a_origin_example_jp;	
     	
  	
  	
  	
  	
  	
  
	
                                                                                                                         backend	
  proxy5_test_k_example_jp	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  elsif	
  (req.http.host	
  ==	
  "test-­‐k.example.jp"){	
                            	
  	
  .host	
  =	
  "10.2.1.26";	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  set	
  req.backend	
  =	
  test_k_example_jp;	
            	
  	
  .port	
  =	
  "8802";	
  
	
                                                                                                                         	
  	
  .connect_timeout	
  =	
  30ms;	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  elsif	
  (req.http.host	
  ==	
  "test-­‐a.example.jp"){	
                            }	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  set	
  req.backend	
  =	
  test_a_example_jp;	
            	
  	
  	
  	
  	
  	
  
	
                                                                                                                         backend	
  proxy5_test_a_example_jp	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  else	
  {	
                                                                           	
  	
  .host	
  =	
  "10.2.1.26";	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  set	
  req.backend	
  =	
  default;	
                      	
  	
  .port	
  =	
  "8803";	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
                                                                                        	
  	
  .connect_timeout	
  =	
  30ms;	
  
}	
                                                                                                                        }	
  
	
                                                                                                                         	
  
Config:	
  varnish(2)	
  
backend	
  proxy5	
  {	
                                          director	
  test_a_origin_example_jp	
  round-­‐robin	
  {	
  
	
  	
  .host	
  =	
  "10.2.1.26";	
                              	
  	
  	
  	
  	
  	
  	
  	
  {	
  .backend	
  	
  	
  	
  	
  	
  =	
  proxy5_test_a_origin_example_jp;	
  }	
  
	
  	
  .port	
  =	
  "80";	
                                     	
  	
  	
  	
  	
  	
  	
  	
  {	
  .backend	
  	
  	
  	
  	
  	
  =	
  proxy4_test_a_origin_example_jp;	
  }}	
  
	
  	
  .connect_timeout	
  =	
  30ms;}	
                         director	
  test_k_example_jp	
  round-­‐robin	
  {	
  
backend	
  proxy4_test_a_origin_example_jp	
  {	
                 	
  	
  	
  	
  	
  	
  	
  	
  {	
  .backend	
  	
  	
  	
  	
  	
  =	
  proxy5_test_k_example_jp;	
  }	
  
	
  	
  .host	
  =	
  "10.2.1.27";	
                              	
  	
  	
  	
  	
  	
  	
  	
  {	
  .backend	
  	
  	
  	
  	
  	
  =	
  proxy4_test_k_example_jp;	
  }}	
  
	
  	
  .port	
  =	
  "8801";	
                                   director	
  test_a_example_jp	
  round-­‐robin	
  {	
  
	
  	
  .connect_timeout	
  =	
  30ms;}	
  	
  	
  	
  	
  	
     	
  	
  	
  	
  	
  	
  	
  	
  {	
  .backend	
  	
  	
  	
  	
  	
  =	
  proxy5_test_a_example_jp;	
  }	
  
backend	
  proxy4_test_k_example_jp	
  {	
                        	
  	
  	
  	
  	
  	
  	
  	
  {	
  .backend	
  	
  	
  	
  	
  	
  =	
  proxy4_test_a_example_jp;	
  }}	
  
	
  	
  .host	
  =	
  "10.2.1.27";	
                              director	
  default	
  round-­‐robin	
  {	
  
	
  	
  .port	
  =	
  "8802";	
                                   	
  	
  	
  	
  	
  	
  	
  	
  {	
  .backend	
  	
  	
  	
  	
  	
  =	
  proxy5;	
  }	
  
	
  	
  .connect_timeout	
  =	
  30ms;}	
                         	
  	
  	
  	
  	
  	
  	
  	
  {	
  .backend	
  	
  	
  	
  	
  	
  =	
  proxy4;	
  }}	
  
backend	
  proxy4_test_a_example_jp	
  {	
                        sub	
  vcl_error{	
  
	
  	
  .host	
  =	
  "10.2.1.27";	
                              	
  	
  	
  	
  	
  	
  	
  	
  if	
  (obj.status	
  ==	
  304)	
  {	
  
	
  	
  .port	
  =	
  "8803";	
                                   	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  return(deliver);}}	
  
	
  	
  .connect_timeout	
  =	
  30ms;}	
                         sub	
  vcl_fetch{	
  
backend	
  proxy4	
  {	
                                          	
  	
  	
  	
  	
  	
  	
  	
  unset	
  beresp.http.X-­‐Cache;	
  
	
  	
  .host	
  =	
  "10.2.1.27";	
                              	
  	
  	
  	
  	
  	
  	
  	
  unset	
  beresp.http.X-­‐Cache-­‐Lookup;	
  
	
  	
  .port	
  =	
  "80";	
                                     	
  	
  	
  	
  	
  	
  	
  	
  unset	
  beresp.http.Via;	
  
	
  	
  .connect_timeout	
  =	
  30ms;}	
                         	
  	
  	
  	
  	
  	
  	
  	
  unset	
  beresp.http.Server;}	
  
	
                                                                	
  
Config:	
  puppet	
  
"   $bport	
  =	
  [8801,8802,8803]	
  

"   $baccel	
  =	
  ["test-­‐a-­‐origin.example.jp",	
  
    "testk.example.jp",	
  "test-­‐a.example.jp”]	
  

"   $borigin	
  =	
  ["test-­‐a-­‐origin.example.jp",	
  
    "testk.example.jp",	
  "test-­‐a.example.jp”]	
  

"   $siblings	
  =	
  ["10.2.1.26",	
  "10.2.1.27"]	
  

"   $siblings_hosts	
  =	
  ["proxy5",	
  "proxy4"]	
  
Puppet!	
  
"               	
  

"   Cache Expire	
  

"                      	
  

"  
      Varnish 3                      	
  

Más contenido relacionado

La actualidad más candente

Performance measurement and tuning
Performance measurement and tuningPerformance measurement and tuning
Performance measurement and tuning
AOE
 
nginx: writing your first module
nginx: writing your first modulenginx: writing your first module
nginx: writing your first module
redivy
 

La actualidad más candente (20)

Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!
 
Roll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and LuaRoll Your Own API Management Platform with nginx and Lua
Roll Your Own API Management Platform with nginx and Lua
 
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationRedis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your application
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queue
 
On UnQLite
On UnQLiteOn UnQLite
On UnQLite
 
tdc2012
tdc2012tdc2012
tdc2012
 
BlockChain implementation by python
BlockChain implementation by pythonBlockChain implementation by python
BlockChain implementation by python
 
Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.key
 
PostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication CheatsheetPostgreSQL Streaming Replication Cheatsheet
PostgreSQL Streaming Replication Cheatsheet
 
Static Typing in Vault
Static Typing in VaultStatic Typing in Vault
Static Typing in Vault
 
Performance measurement and tuning
Performance measurement and tuningPerformance measurement and tuning
Performance measurement and tuning
 
Bootstrapping multidc observability stack
Bootstrapping multidc observability stackBootstrapping multidc observability stack
Bootstrapping multidc observability stack
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp Vault
 
Lua tech talk
Lua tech talkLua tech talk
Lua tech talk
 
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술
DEVIEW - 오픈소스를 활용한 분산아키텍처 구현기술
 
nginx: writing your first module
nginx: writing your first modulenginx: writing your first module
nginx: writing your first module
 
Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the Edge
 
Reactive server with netty
Reactive server with nettyReactive server with netty
Reactive server with netty
 
It's 10pm: Do You Know Where Your Writes Are?
It's 10pm: Do You Know Where Your Writes Are?It's 10pm: Do You Know Where Your Writes Are?
It's 10pm: Do You Know Where Your Writes Are?
 

Similar a tokyo.vcl発表資料(varnish+squid)

Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
yiditushe
 

Similar a tokyo.vcl発表資料(varnish+squid) (20)

Introduction to Protractor
Introduction to ProtractorIntroduction to Protractor
Introduction to Protractor
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1
 
HTTP Caching and PHP
HTTP Caching and PHPHTTP Caching and PHP
HTTP Caching and PHP
 
Puppet
PuppetPuppet
Puppet
 
Nginx + PHP
Nginx + PHPNginx + PHP
Nginx + PHP
 
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2013 - Sheeri Cabral - Alerting With MySQL and Nagios
 
Varnish Cache and Django (Falcon, Flask etc)
Varnish Cache and Django (Falcon, Flask etc)Varnish Cache and Django (Falcon, Flask etc)
Varnish Cache and Django (Falcon, Flask etc)
 
Varnish
VarnishVarnish
Varnish
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
Tatsumaki
TatsumakiTatsumaki
Tatsumaki
 
Clug 2012 March web server optimisation
Clug 2012 March   web server optimisationClug 2012 March   web server optimisation
Clug 2012 March web server optimisation
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Altitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the EdgeAltitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the Edge
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법
 
Test driven infrastructure
Test driven infrastructureTest driven infrastructure
Test driven infrastructure
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rack
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
Php Unit With Zend Framework Zendcon09
Php Unit With Zend Framework   Zendcon09Php Unit With Zend Framework   Zendcon09
Php Unit With Zend Framework Zendcon09
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 

Más de Yasuhiro Araki, Ph.D

20140628 AWSの2014前半のアップデートまとめ
20140628 AWSの2014前半のアップデートまとめ20140628 AWSの2014前半のアップデートまとめ
20140628 AWSの2014前半のアップデートまとめ
Yasuhiro Araki, Ph.D
 
S3をてなづけてオレオレバックエンドにしてみた話
S3をてなづけてオレオレバックエンドにしてみた話S3をてなづけてオレオレバックエンドにしてみた話
S3をてなづけてオレオレバックエンドにしてみた話
Yasuhiro Araki, Ph.D
 

Más de Yasuhiro Araki, Ph.D (20)

1999年JUSメールサーバワークショップ@伊勢志摩
1999年JUSメールサーバワークショップ@伊勢志摩1999年JUSメールサーバワークショップ@伊勢志摩
1999年JUSメールサーバワークショップ@伊勢志摩
 
サービスをスケールさせるために AWSと利用者の技術
サービスをスケールさせるために AWSと利用者の技術サービスをスケールさせるために AWSと利用者の技術
サービスをスケールさせるために AWSと利用者の技術
 
AWSのIPv6対応状況@JAWS-UG大阪
AWSのIPv6対応状況@JAWS-UG大阪AWSのIPv6対応状況@JAWS-UG大阪
AWSのIPv6対応状況@JAWS-UG大阪
 
今だから!Amazon CloudFront 徹底活用
今だから!Amazon CloudFront 徹底活用今だから!Amazon CloudFront 徹底活用
今だから!Amazon CloudFront 徹底活用
 
20151016 soracom-araki-02
20151016 soracom-araki-0220151016 soracom-araki-02
20151016 soracom-araki-02
 
Webサービス向け、クラウドデザインパターン:アンチパターン紹介
Webサービス向け、クラウドデザインパターン:アンチパターン紹介Webサービス向け、クラウドデザインパターン:アンチパターン紹介
Webサービス向け、クラウドデザインパターン:アンチパターン紹介
 
AWSにみる日本のクラウドのトレンド予測 20150321 jaws-tohoku
AWSにみる日本のクラウドのトレンド予測 20150321 jaws-tohokuAWSにみる日本のクラウドのトレンド予測 20150321 jaws-tohoku
AWSにみる日本のクラウドのトレンド予測 20150321 jaws-tohoku
 
20141202 jaws-osaka-hangeki
20141202 jaws-osaka-hangeki20141202 jaws-osaka-hangeki
20141202 jaws-osaka-hangeki
 
20141126 jaws-antipattern
20141126 jaws-antipattern20141126 jaws-antipattern
20141126 jaws-antipattern
 
クラウドによる運用の計測と運用価値の表現、その未来
クラウドによる運用の計測と運用価値の表現、その未来クラウドによる運用の計測と運用価値の表現、その未来
クラウドによる運用の計測と運用価値の表現、その未来
 
AWS 専用線アクセス体験ラボ紹介と 開催地立候補のお願い
AWS 専用線アクセス体験ラボ紹介と開催地立候補のお願いAWS 専用線アクセス体験ラボ紹介と開催地立候補のお願い
AWS 専用線アクセス体験ラボ紹介と 開催地立候補のお願い
 
20140906 jawsfesta-araki-lt
20140906 jawsfesta-araki-lt20140906 jawsfesta-araki-lt
20140906 jawsfesta-araki-lt
 
20140906 jawsfesta-araki-public
20140906 jawsfesta-araki-public20140906 jawsfesta-araki-public
20140906 jawsfesta-araki-public
 
AWSつもり違い10箇条 at 201408 jaws高尾山ビアマウント
AWSつもり違い10箇条 at 201408 jaws高尾山ビアマウント AWSつもり違い10箇条 at 201408 jaws高尾山ビアマウント
AWSつもり違い10箇条 at 201408 jaws高尾山ビアマウント
 
20140717 awssummit2014-cloud-operation
20140717 awssummit2014-cloud-operation20140717 awssummit2014-cloud-operation
20140717 awssummit2014-cloud-operation
 
20140628 AWSの2014前半のアップデートまとめ
20140628 AWSの2014前半のアップデートまとめ20140628 AWSの2014前半のアップデートまとめ
20140628 AWSの2014前半のアップデートまとめ
 
20140621 july techfesta (JTF2014) 突発**むけAWS
20140621 july techfesta (JTF2014) 突発**むけAWS20140621 july techfesta (JTF2014) 突発**むけAWS
20140621 july techfesta (JTF2014) 突発**むけAWS
 
MTのスケールアップパターン with AWS
MTのスケールアップパターン with AWSMTのスケールアップパターン with AWS
MTのスケールアップパターン with AWS
 
S3をてなづけてオレオレバックエンドにしてみた話
S3をてなづけてオレオレバックエンドにしてみた話S3をてなづけてオレオレバックエンドにしてみた話
S3をてなづけてオレオレバックエンドにしてみた話
 
20140418 aws-casual-network
20140418 aws-casual-network20140418 aws-casual-network
20140418 aws-casual-network
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

tokyo.vcl発表資料(varnish+squid)

  • 1. Varnish Squid w/  puppet   @ar1  
  • 2. §  §  Debian     §  Amazon  Web  Services   ú  Solutions  Architect   ú 
  • 3. LoadBalance:   HighSpeed-­‐ LVS   Cache   HAProxy  
  • 4. ( )    
  • 5.    
  • 6.   !    
  • 7.  
  • 8. Cache   Shareing   LoadBalance:   HighSpeed-­‐ Sibling   LVS   Cache   HAProxy  
  • 9. Request URI test-­‐a.example.jp     varnish cache   cache squid  
  • 10. squid cache   cache sibling   HTTPD  
  • 11. Config:  squid   [sibling.conf]  cache_peer  10.2.1.26  sibling  80  3130   [squid.conf]   http_port  8801  accel  defaultsite=test-­‐a-­‐origin.example.jp   cache_peer  test-­‐a-­‐origin.example.jp  parent  80  0  originserver  name=test-­‐a-­‐origin_example_jp   acl  test-­‐a-­‐origin_example_jp  dstdomain  test-­‐a-­‐origin.example.jp   http_access  allow  test-­‐a-­‐origin_example_jp   cache_peer_access  test-­‐a-­‐origin_example_jp  allow  test-­‐a-­‐origin_example_jp   cache_peer_access  test-­‐a-­‐origin_example_jp  deny  all   http_port  8802  accel  defaultsite=test-­‐k.example.jp   cache_peer  test-­‐k.example.jp  parent  80  0  originserver  name=test-­‐k_example_jp   acl  test-­‐k_example_jp  dstdomain  test-­‐k.example.jp   http_access  allow  test-­‐k_example_jp   cache_peer_access  test-­‐k_example_jp  allow  test-­‐k_example_jp   cache_peer_access  test-­‐k_example_jp  deny  all   http_port  8803  accel  defaultsite=test-­‐a.example.jp   cache_peer  test-­‐a.example.jp  parent  80  0  originserver  name=test-­‐a_example_jp   acl  test-­‐a_example_jp  dstdomain  test-­‐a.example.jp   http_access  allow  test-­‐a_example_jp   cache_peer_access  test-­‐a_example_jp  allow  test-­‐a_example_jp   cache_peer_access  test-­‐a_example_jp  deny  all    
  • 12. Config:  varnish   sub  vcl_recv  {   backend  proxy5_test_a_origin_example_jp  {                  if  (req.http.If-­‐Modified-­‐Since)  {      .host  =  "10.2.1.26";                                  error  304;      .port  =  "8801";                  }      .connect_timeout  =  30ms;                  if  (req.http.host  ==  "test-­‐a-­‐origin.example.jp"){   }                                  set  req.backend  =  test_a_origin_example_jp;                 backend  proxy5_test_k_example_jp  {                  }  elsif  (req.http.host  ==  "test-­‐k.example.jp"){      .host  =  "10.2.1.26";                                  set  req.backend  =  test_k_example_jp;      .port  =  "8802";        .connect_timeout  =  30ms;                  }  elsif  (req.http.host  ==  "test-­‐a.example.jp"){   }                                  set  req.backend  =  test_a_example_jp;                 backend  proxy5_test_a_example_jp  {                  }  else  {      .host  =  "10.2.1.26";                                  set  req.backend  =  default;      .port  =  "8803";                  }      .connect_timeout  =  30ms;   }   }      
  • 13. Config:  varnish(2)   backend  proxy5  {   director  test_a_origin_example_jp  round-­‐robin  {      .host  =  "10.2.1.26";                  {  .backend            =  proxy5_test_a_origin_example_jp;  }      .port  =  "80";                  {  .backend            =  proxy4_test_a_origin_example_jp;  }}      .connect_timeout  =  30ms;}   director  test_k_example_jp  round-­‐robin  {   backend  proxy4_test_a_origin_example_jp  {                  {  .backend            =  proxy5_test_k_example_jp;  }      .host  =  "10.2.1.27";                  {  .backend            =  proxy4_test_k_example_jp;  }}      .port  =  "8801";   director  test_a_example_jp  round-­‐robin  {      .connect_timeout  =  30ms;}                            {  .backend            =  proxy5_test_a_example_jp;  }   backend  proxy4_test_k_example_jp  {                  {  .backend            =  proxy4_test_a_example_jp;  }}      .host  =  "10.2.1.27";   director  default  round-­‐robin  {      .port  =  "8802";                  {  .backend            =  proxy5;  }      .connect_timeout  =  30ms;}                  {  .backend            =  proxy4;  }}   backend  proxy4_test_a_example_jp  {   sub  vcl_error{      .host  =  "10.2.1.27";                  if  (obj.status  ==  304)  {      .port  =  "8803";                                  return(deliver);}}      .connect_timeout  =  30ms;}   sub  vcl_fetch{   backend  proxy4  {                  unset  beresp.http.X-­‐Cache;      .host  =  "10.2.1.27";                  unset  beresp.http.X-­‐Cache-­‐Lookup;      .port  =  "80";                  unset  beresp.http.Via;      .connect_timeout  =  30ms;}                  unset  beresp.http.Server;}      
  • 14.
  • 15. Config:  puppet   "   $bport  =  [8801,8802,8803]   "   $baccel  =  ["test-­‐a-­‐origin.example.jp",   "testk.example.jp",  "test-­‐a.example.jp”]   "   $borigin  =  ["test-­‐a-­‐origin.example.jp",   "testk.example.jp",  "test-­‐a.example.jp”]   "   $siblings  =  ["10.2.1.26",  "10.2.1.27"]   "   $siblings_hosts  =  ["proxy5",  "proxy4"]  
  • 16. Puppet!   "     "   Cache Expire   "     "   Varnish 3