SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Copyright© 2013, pnop Inc., All Rights Reserved.
らいとにんぐとーく
Copyright© 2013, pnop Inc., All Rights Reserved.
Self introduction
{
"name" : "Keiji Kamebuchi",
"corporation" : "pnop Inc.",
"mail" : "kamebuchi@pnop.co.jp",
"web" : "http://buchizo.wordpress.com/",
"twitter" : "@kamebuchi",
"facebook" : "https://www.facebook.com/keijikamebuchi"
}
KeijiKamebuchi buchizo@kamebuchiSenior Fellow
Copyright© 2013, pnop Inc., All Rights Reserved.
Copyright© 2013, pnop Inc., All Rights Reserved.
Copyright© 2013, pnop Inc., All Rights Reserved.
Copyright© 2013, pnop Inc., All Rights Reserved.
Windows Azure
Cache Service
Copyright© 2013, pnop Inc., All Rights Reserved.
おさらい
On premise Microsoft AppFabric 1.1 for Windows Server
Cloud Windows Azure Shared Caching
Windows Azure Caching
 Windows Azure Shared Caching → サヨウナラ
 Windows Azure Caching → Windows Azure In-Role Cache
 Windows Azure Cache Service ← NEW!
Copyright© 2013, pnop Inc., All Rights Reserved.
What is the Cache Service?
 2013/09/04 Preview
 Microsoft AppFabric 1.1 for Windows Server の SaaS版
 In-Role Cacheもそう
 占有型(Shared Cachingは共用型)
 スケーラブル
 高可用性*
 ローカルキャッシュ
 通知サポート
 圧縮通信のサポート
 カスタムシリアライズのサポート
 ASP.NET Session State Provider/Output caching Providerをサポート
 memcached互換(予定)
Copyright© 2013, pnop Inc., All Rights Reserved.
Windows Azure Shared Cachingは?
 2014年8月31日をもって終了
 旧管理ポータル( https://windows.azure.com/ )は。。。
Copyright© 2013, pnop Inc., All Rights Reserved.
構成
Endpoint
<name>.cache.windows.net
= <name-internal>.cloudapp.net
unit (instance)
HTTPS/443 ACS (OAuth WRAP v0.9)
<name-internal>-cache.accesscontrol.windows.net
/WRAPv0.9/token
SSLなし
TCP/24233
SSLあり
TCP/25233
※ 他にもTCP/22234 (クラスタポート)などを利用
Copyright© 2013, pnop Inc., All Rights Reserved.
プランとユニット
unit (instance)
Endpoint
<name>.cache.windows.net
= <name-internal>.cloudapp.net
128 MB
128 MB
128 MB
unit (instance)
unit (instance)
384MB
Distributed Cache
Basic … 8ユニットまで 128 MB ~ 1GB S?
Standard ... 10ユニットまで 1GB ~ 10 GB M?
Premium ... 30ユニットまで 5 GB ~ 150 GB L?
¥ネットワーク転送料
※データセンター外
¥ユニット使用料
Copyright© 2013, pnop Inc., All Rights Reserved.
作成
Copyright© 2013, pnop Inc., All Rights Reserved.
ダッシュボード
Copyright© 2013, pnop Inc., All Rights Reserved.
監視
Copyright© 2013, pnop Inc., All Rights Reserved.
構成
Standard/Premiumのみ
PremiumのみBasic … 1つ (default)だけ
Standard/Premium … 10まで
Copyright© 2013, pnop Inc., All Rights Reserved.
スケール
Copyright© 2013, pnop Inc., All Rights Reserved.
構成の詳細
項目 内容
Name キャッシュ領域の名称です。既定は”default”でBasicプランの場合は1つだけ。スタンダードまたはプ
レミアプランの場合は最大10個定義できます。
Expire Policy キャッシュの有効期限について3種類のポリシーから選択します。
Absolute … アイテム追加後、Timeで指定した期限(分)が経過すると削除されます。
Sliding … アイテムにアクセスがあるたびに経過時間がリセットされます。 最終アクセス時刻から
Timeで指定した期限(分)が経過したアイテムは削除されます。
Never … 有効期限は無効です。強制的に破棄されるまでアイテムはキャッシュに残ります。Neverを
指定した場合はTimeに0を設定する必要があります。
Time (min) キャッシュにアイテムを保持する期限(分単位)です。Expire Policyと連動します。
Notifications キャッシュ操作が発生した時に非同期通知を受信するかどうかを設定します。通知はスタンダードまた
はプレミアプランでのみ設定可能です。
High Availability キャッシュの高可用性オプションの使用有無を設定します。有効にした場合、キャッシュのアイテムは
コピーされ障害が発生した場合でもキャッシュ内のデータを保持できるようにします。
プレミアプランでのみ利用可能。障害発生時はDataCacheExceptionを受け取るので適当なリトライ処
理が必要。
Eviction キャッシュサイズがメモリ上限に達した際に、最低使用頻度(LRU)アルゴリズムに基づいてアイテム
を破棄するかどうかを設定します。有効にした場合、メモリ上限に達した場合はアイテムの有効期限に
関係なく利用されていないアイテムから破棄されます。
無効にした場合、キャッシュのメモリが空くまで追加しようとすると例外を受け取ることになります。
(スロットリングされます)
Copyright© 2013, pnop Inc., All Rights Reserved.
使ってみる
var cacheconfig = new DataCacheFactoryConfiguration()
{
AutoDiscoverProperty = new DataCacheAutoDiscoverProperty(true,
"buchizo.cache.windows.net"),
SecurityProperties = new DataCacheSecurity(@"<Key>", false)
};
using (var factory = new DataCacheFactory(cacheconfig))
{
var cache = factory.GetCache("default");
cache.Put("test", "testvalue");
Console.WriteLine(cache.Get("test"));
}
Copyright© 2013, pnop Inc., All Rights Reserved.
注意点
 RoleEntryPointなどで使用する場合
 Web.configが見れないので自分でConfigがんばりましょう
 maxConnectionsToServer や Connection Pooling
 パフォーマンス出すためによく考えて設定しましょう
 Understand and Manage Connections for Windows Azure Cache Service
(Preview)
 http://msdn.microsoft.com/en-us/library/windowsazure/dn386109.aspx
 DataCacheFactoryはできるだけ少なく
 HAする場合はリトライ処理に注意
 今のところWindows 環境(.NET/C++/Node.js(?))からのみ利用可
 Memcachd互換がサポートされれば。。(GAまでもしくはUpdateに期待)
Copyright© 2013, pnop Inc., All Rights Reserved.
パフォーマンス
 クライアント : Cloud Service (L) , 4CPU / East Asia / SSLなし
 キャッシュ : Standard, 1unit (1GB) / East Asia
Copyright© 2013, pnop Inc., All Rights Reserved.
パフォーマンス
 平均読み込み・書き込み時間を見てみる
Copyright© 2013, pnop Inc., All Rights Reserved.
パフォーマンス
5万件の平均 (Regionあり)
PUT : 1.10854 ms , 14186.76 Ticks
GET : 1.08548 ms , 13524.62 Ticks
5万件の平均 (Regionなし)
PUT : 1.14544 ms ,15162.59 Ticks
GET : 1.12772 ms , 14786.97 Ticks
ちなみにLocalCache有効にすると
2回目のGETは平均 91.8 Ticksぐらい
Copyright© 2013, pnop Inc., All Rights Reserved.
特に参考にならないグラフ
Copyright© 2013, pnop Inc., All Rights Reserved.
どう選ぶ?
 Azure Webサイトまたは仮想マシンでキャッシュを使いたい
 Cache Serviceを使えばいいんでない?
 インストール・メンテナンスの手間が省ける
 料金も安め
 クラウドサービスでキャッシュを使いたい
 メモリ(とCPU)に余力があるようであればIn-Role Cacheもアリ
 Workerロールで専用キャッシュにするぐらいならCache Serviceのほうが
お得でしょう
 キャッシュサイズや利用状況で好きなの選びましょう
 In-Role Cacheの場合、設定の手間や監視どうする?というのは残る
 memcachedとして使いたい
 今のところIn-Role Cacheでmemcacheなプロトコルを受け付けてあげると
よさそう
Copyright© 2013, pnop Inc., All Rights Reserved.
キャパシティプランニング
 プランニングツールがあるので活用しましょう
 http://msdn.microsoft.com/en-us/library/windowsazure/dn386139.aspx
Copyright© 2013, pnop Inc., All Rights Reserved.
結論
速度は課金(と知恵と工夫)で何とかなる
かもしれないですね!
Copyright© 2013, pnop Inc., All Rights Reserved.
まとめ
キ
ャ
ッ
シ
ュ
と
日
本
リ
ー
ジ
ョ
ン
で
レ
イ
テ
ン
シ

Weitere ähnliche Inhalte

Empfohlen

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

20130907 JAZUG第3回総会LT

  • 1. Copyright© 2013, pnop Inc., All Rights Reserved. らいとにんぐとーく
  • 2. Copyright© 2013, pnop Inc., All Rights Reserved. Self introduction { "name" : "Keiji Kamebuchi", "corporation" : "pnop Inc.", "mail" : "kamebuchi@pnop.co.jp", "web" : "http://buchizo.wordpress.com/", "twitter" : "@kamebuchi", "facebook" : "https://www.facebook.com/keijikamebuchi" } KeijiKamebuchi buchizo@kamebuchiSenior Fellow
  • 3. Copyright© 2013, pnop Inc., All Rights Reserved.
  • 4. Copyright© 2013, pnop Inc., All Rights Reserved.
  • 5. Copyright© 2013, pnop Inc., All Rights Reserved.
  • 6. Copyright© 2013, pnop Inc., All Rights Reserved. Windows Azure Cache Service
  • 7. Copyright© 2013, pnop Inc., All Rights Reserved. おさらい On premise Microsoft AppFabric 1.1 for Windows Server Cloud Windows Azure Shared Caching Windows Azure Caching  Windows Azure Shared Caching → サヨウナラ  Windows Azure Caching → Windows Azure In-Role Cache  Windows Azure Cache Service ← NEW!
  • 8. Copyright© 2013, pnop Inc., All Rights Reserved. What is the Cache Service?  2013/09/04 Preview  Microsoft AppFabric 1.1 for Windows Server の SaaS版  In-Role Cacheもそう  占有型(Shared Cachingは共用型)  スケーラブル  高可用性*  ローカルキャッシュ  通知サポート  圧縮通信のサポート  カスタムシリアライズのサポート  ASP.NET Session State Provider/Output caching Providerをサポート  memcached互換(予定)
  • 9. Copyright© 2013, pnop Inc., All Rights Reserved. Windows Azure Shared Cachingは?  2014年8月31日をもって終了  旧管理ポータル( https://windows.azure.com/ )は。。。
  • 10. Copyright© 2013, pnop Inc., All Rights Reserved. 構成 Endpoint <name>.cache.windows.net = <name-internal>.cloudapp.net unit (instance) HTTPS/443 ACS (OAuth WRAP v0.9) <name-internal>-cache.accesscontrol.windows.net /WRAPv0.9/token SSLなし TCP/24233 SSLあり TCP/25233 ※ 他にもTCP/22234 (クラスタポート)などを利用
  • 11. Copyright© 2013, pnop Inc., All Rights Reserved. プランとユニット unit (instance) Endpoint <name>.cache.windows.net = <name-internal>.cloudapp.net 128 MB 128 MB 128 MB unit (instance) unit (instance) 384MB Distributed Cache Basic … 8ユニットまで 128 MB ~ 1GB S? Standard ... 10ユニットまで 1GB ~ 10 GB M? Premium ... 30ユニットまで 5 GB ~ 150 GB L? ¥ネットワーク転送料 ※データセンター外 ¥ユニット使用料
  • 12. Copyright© 2013, pnop Inc., All Rights Reserved. 作成
  • 13. Copyright© 2013, pnop Inc., All Rights Reserved. ダッシュボード
  • 14. Copyright© 2013, pnop Inc., All Rights Reserved. 監視
  • 15. Copyright© 2013, pnop Inc., All Rights Reserved. 構成 Standard/Premiumのみ PremiumのみBasic … 1つ (default)だけ Standard/Premium … 10まで
  • 16. Copyright© 2013, pnop Inc., All Rights Reserved. スケール
  • 17. Copyright© 2013, pnop Inc., All Rights Reserved. 構成の詳細 項目 内容 Name キャッシュ領域の名称です。既定は”default”でBasicプランの場合は1つだけ。スタンダードまたはプ レミアプランの場合は最大10個定義できます。 Expire Policy キャッシュの有効期限について3種類のポリシーから選択します。 Absolute … アイテム追加後、Timeで指定した期限(分)が経過すると削除されます。 Sliding … アイテムにアクセスがあるたびに経過時間がリセットされます。 最終アクセス時刻から Timeで指定した期限(分)が経過したアイテムは削除されます。 Never … 有効期限は無効です。強制的に破棄されるまでアイテムはキャッシュに残ります。Neverを 指定した場合はTimeに0を設定する必要があります。 Time (min) キャッシュにアイテムを保持する期限(分単位)です。Expire Policyと連動します。 Notifications キャッシュ操作が発生した時に非同期通知を受信するかどうかを設定します。通知はスタンダードまた はプレミアプランでのみ設定可能です。 High Availability キャッシュの高可用性オプションの使用有無を設定します。有効にした場合、キャッシュのアイテムは コピーされ障害が発生した場合でもキャッシュ内のデータを保持できるようにします。 プレミアプランでのみ利用可能。障害発生時はDataCacheExceptionを受け取るので適当なリトライ処 理が必要。 Eviction キャッシュサイズがメモリ上限に達した際に、最低使用頻度(LRU)アルゴリズムに基づいてアイテム を破棄するかどうかを設定します。有効にした場合、メモリ上限に達した場合はアイテムの有効期限に 関係なく利用されていないアイテムから破棄されます。 無効にした場合、キャッシュのメモリが空くまで追加しようとすると例外を受け取ることになります。 (スロットリングされます)
  • 18. Copyright© 2013, pnop Inc., All Rights Reserved. 使ってみる var cacheconfig = new DataCacheFactoryConfiguration() { AutoDiscoverProperty = new DataCacheAutoDiscoverProperty(true, "buchizo.cache.windows.net"), SecurityProperties = new DataCacheSecurity(@"<Key>", false) }; using (var factory = new DataCacheFactory(cacheconfig)) { var cache = factory.GetCache("default"); cache.Put("test", "testvalue"); Console.WriteLine(cache.Get("test")); }
  • 19. Copyright© 2013, pnop Inc., All Rights Reserved. 注意点  RoleEntryPointなどで使用する場合  Web.configが見れないので自分でConfigがんばりましょう  maxConnectionsToServer や Connection Pooling  パフォーマンス出すためによく考えて設定しましょう  Understand and Manage Connections for Windows Azure Cache Service (Preview)  http://msdn.microsoft.com/en-us/library/windowsazure/dn386109.aspx  DataCacheFactoryはできるだけ少なく  HAする場合はリトライ処理に注意  今のところWindows 環境(.NET/C++/Node.js(?))からのみ利用可  Memcachd互換がサポートされれば。。(GAまでもしくはUpdateに期待)
  • 20. Copyright© 2013, pnop Inc., All Rights Reserved. パフォーマンス  クライアント : Cloud Service (L) , 4CPU / East Asia / SSLなし  キャッシュ : Standard, 1unit (1GB) / East Asia
  • 21. Copyright© 2013, pnop Inc., All Rights Reserved. パフォーマンス  平均読み込み・書き込み時間を見てみる
  • 22. Copyright© 2013, pnop Inc., All Rights Reserved. パフォーマンス 5万件の平均 (Regionあり) PUT : 1.10854 ms , 14186.76 Ticks GET : 1.08548 ms , 13524.62 Ticks 5万件の平均 (Regionなし) PUT : 1.14544 ms ,15162.59 Ticks GET : 1.12772 ms , 14786.97 Ticks ちなみにLocalCache有効にすると 2回目のGETは平均 91.8 Ticksぐらい
  • 23. Copyright© 2013, pnop Inc., All Rights Reserved. 特に参考にならないグラフ
  • 24. Copyright© 2013, pnop Inc., All Rights Reserved. どう選ぶ?  Azure Webサイトまたは仮想マシンでキャッシュを使いたい  Cache Serviceを使えばいいんでない?  インストール・メンテナンスの手間が省ける  料金も安め  クラウドサービスでキャッシュを使いたい  メモリ(とCPU)に余力があるようであればIn-Role Cacheもアリ  Workerロールで専用キャッシュにするぐらいならCache Serviceのほうが お得でしょう  キャッシュサイズや利用状況で好きなの選びましょう  In-Role Cacheの場合、設定の手間や監視どうする?というのは残る  memcachedとして使いたい  今のところIn-Role Cacheでmemcacheなプロトコルを受け付けてあげると よさそう
  • 25. Copyright© 2013, pnop Inc., All Rights Reserved. キャパシティプランニング  プランニングツールがあるので活用しましょう  http://msdn.microsoft.com/en-us/library/windowsazure/dn386139.aspx
  • 26. Copyright© 2013, pnop Inc., All Rights Reserved. 結論 速度は課金(と知恵と工夫)で何とかなる かもしれないですね!
  • 27. Copyright© 2013, pnop Inc., All Rights Reserved. まとめ キ ャ ッ シ ュ と 日 本 リ ー ジ ョ ン で レ イ テ ン シ