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

「Azure Cosmos DB」の キホンと使いドコロ / mcw0006742

miyake
June 07, 2018

「Azure Cosmos DB」の キホンと使いドコロ / mcw0006742

2018年6月7日に日本マイクロソフト株式会社主催で実施されたウェビナー"クラウドネイティブなアプリケーションを実現する「Azure Cosmos DB」のキホンと使いドコロ"で発表した資料です。

miyake

June 07, 2018
Tweet

More Decks by miyake

Other Decks in Technology

Transcript

  1. n 3 0:/ 8 / : :2 /:8 5- 5

    -B 1 /: 8: 0. n ❃ 3 /3-991 8 09 /:8 19 0 n ❃ 3 01 3- 1 91 - :9-: 01/:01 0- /: 8: 0.
  2. SQL MongoDB Table API Turnkey global distribution Elastic scale out

    of storage & throughput Guaranteed low latency at the 99th percentile Comprehensive SLAs Five well-defined consistency models Document Column-family Key-value Graph A globally distributed, massively scalable, multi-model database service : / / 33.1 2 3 2 9.3 801
  3. n ❃ ❃ ❃ n : A technical overview of

    Azure Cosmos DB https://azure.microsoft.com/en-us/blog/a-technical-overview-of-azure-cosmos-db/
  4. : 1 898 82 Resource M anager Language Runtim e(s)

    Hosts Q uery Processor RSM Index M anager Bw -tree++/ LLAM A++ Log M anager IO M anager Resource Governor Transport Database engine Adm ission control … … Planet Earth Azure regions Datacenters Stamps Fault domains Cluster Machine Replica Database engine Container Various agents 3 9: /3. 1 :0 /8 1 : 0
  5. CA n ❃ A L L A BL • -

    ( K A ( • ( • ( • ( ) B A L • ( GIDF
  6.          

       Azure Cosmos DB App Service 1 App Service 2 Azure Traffic Manager   $  "         $  "         #           % !       
  7. n ❃ ❃ ❃ n ❃ ❃ ❃ // .

    / / A :B - . / / . % IOPS % CPU % Memory
  8. ž ž L# :/ BC DA C # . -

    -: - :/ - . :/ / / / / : /
  9. Azure Cosmos DB Azure Database for MySQL Web App Azure

    Functions           Write Read Publish "   # $ ! 
  10. F C F Azure Cosmos DB Azure Stream Analytics Azure

    Event Hubs Azure Data Lake Store Power BI Azure Functions + C C Azure Databricks H  
  11. n ❃ ❃ ❃      

                Azure Stream Analytics Azure Event Hubs Azure Cosmos DB
  12.  Function App   Azure Storage - Queue monitor

      App Service   Cosmos DB Application Insights ςϨϝτϦ Azure Monitor monitor
  13. .NET SQL Database App Service Web App / API App

    / Mobile App Windows ASP.NET   Cosmos DB SQL API Documet        Node.js App Service Web App / API App / Linux Node.js   Express Cosmos DB MongoDB API Documet        Azure Database for MySQL
  14. Easy out-of-the-box bulk operation functionality Supports bulk import and update

    Auto handles congestion control + transient errors 10x client-side performance improvement Easily scale-out clients across more VMs Available starting with .NET and Java "    ! #  .NET SDK.NET Core
  15. Remove friction for OSS NoSQL APIs Provision RU/sec shared across

    containers Mix containers with dedicated throughput and containers with shared throughput Elastically scale provisioned throughput for a set of containers at any time 50,000RU  
  16. Perfect for Intelligent Cloud and Intelligent Edge Applications Write scalability

    around the world Low latency writes around the world 99.999% High Availability around the world Well-defined consistency models Comprehensive conflict management  Cosmos DB   !  "20185#
  17. n ❃ ❃ n ❃ ❃ ❃ n ❃ ❃

    Provisioned request / sec Time - Hourly throughput (request/sec) 2 8 C ABD A BN : 1 0 860 0 8 . : . 2 0 8 1/ 2 4 :
  18. • • A .= ( = = .= ; )

    ; ) A ; C , = A , = ; D : C B D A - . / / . .
  19. // u c ls var connectionPolicy = new ConnectionPolicy {

    ConnectionMode = ConnectionMode.Direct, // eS ConnectionProtocol = Protocol.Tcp // TCP }; // c af r i connectionPolicy.PreferredLocations.Add("Japan West"); connectionPolicy.PreferredLocations.Add("Japan East"); connectionPolicy.PreferredLocations.Add("Southeast Asia"); // DocumentDBSb f ts client = new DocumentClient( new Uri(ConfigurationManager.AppSettings["endpoint"]), ConfigurationManager.AppSettings["authKey"], connectionPolicy ); client.OpenAsync(); // f D g u B u Sb f tsn c af B mk h c af o d Pf C / . /: . - py
  20.   - • s ky nc K ba •

    ky K A - . • dfp s ky S u teoil a K P ba K • K - • izfd r mojy K ba • tg r ( , C • ba K b u teoil a hxou P • K ( bS izfd r S ( a K aK ( S ( ba B A. • • • izfd r a K a EA ( : ) v : : . .EA : / D B    •  •  •  
  21. n ❃ ❃ / - / / /- / -/

    . . / { "automatic": true, "indexingMode": "Consistent", "includedPaths": [{ "path": "/*", "indexes": [{ "kind": "Hash", "dataType": "String", "precision": -1 }, { "kind": "Range", "dataType": "Number", "precision": -1 }, { "kind": "Spatial", "dataType": "Point" }] }], "excludedPaths": [{ "path": "/nonIndexedContent/*" }] }
  22. n ❃ ❃ n ❃ : / - / /

    /- # # / -/ / #-- . # # # / #- #. # /.