中国存储论坛

 找回密码
 立即注册

手机号码,快捷登录

查看: 31750|回复: 100

最全的Riak介绍PPT,共558页

[复制链接]
发表于 2015-8-18 18:57:20 | 显示全部楼层 |阅读模式
安全库半导体世界IT采购网半导体联盟
Riak简介是由技术公司basho开发的一个类Dynamo的分布式Key-Value系统, Riak是一个NoSQL数据库,采用了key-value的存储模式。其以分布式,水平扩展性,高容错性等特点著称。见文章《Riak介绍 一个分布式数据存储ppt下载


游客,如果您要查看本帖隐藏内容请回复


格式注意,是个keynote文件,mac用户知道的。


ppt目录
Transcript of "Riak Training Session — Surge 2011"
  • 1. Riak Tutorial Sean Cribbs & Ian Plosker Basho Technologiesbasho
  • 2. What is Riak?
  • 3. • Key-Value store (plus extras)
  • 4. • Key-Value store (plus extras)• Distributed, horizontally scalable
  • 5. • Key-Value store (plus extras)• Distributed, horizontally scalable• Fault-tolerant
  • 6. • Key-Value store (plus extras)• Distributed, horizontally scalable• Fault-tolerant• Highly-available
  • 7. • Key-Value store (plus extras)• Distributed, horizontally scalable• Fault-tolerant• Highly-available• Built for the Web
  • 8. • Key-Value store (plus extras)• Distributed, horizontally scalable• Fault-tolerant• Highly-available• Built for the Web• Inspired by Amazon’s Dynamo
  • 9. Key-Value
  • 10. Key-Value• Simple operations - get, put, delete
  • 11. Key-Value• Simple operations - get, put, delete• Value is mostly opaque (some metadata)
  • 12. Key-Value• Simple operations - get, put, delete• Value is mostly opaque (some metadata)• Extras
  • 13. Key-Value• Simple operations - get, put, delete• Value is mostly opaque (some metadata)• Extras • MapReduce
  • 14. Key-Value• Simple operations - get, put, delete• Value is mostly opaque (some metadata)• Extras • MapReduce • Links
  • 15. Key-Value• Simple operations - get, put, delete• Value is mostly opaque (some metadata)• Extras • MapReduce • Links • Full-text search (new, optional)
  • 16. Key-Value• Simple operations - get, put, delete• Value is mostly opaque (some metadata)• Extras • MapReduce • Links • Full-text search (new, optional) • Secondary Indexes
  • 17. Distributed &Horizontally
  • 18. Distributed & Horizontally• Default configuration is in a cluster
  • 19. Distributed & Horizontally• Default configuration is in a cluster• Load and data are spread evenly
  • 20. Distributed & Horizontally• Default configuration is in a cluster• Load and data are spread evenly• Add more nodes to get more X
  • 21. Fault-Tolerant
  • 22. Fault-Tolerant• All nodes participate equally - no SPOF
  • 23. Fault-Tolerant• All nodes participate equally - no SPOF• All data is replicated
  • 24. Fault-Tolerant• All nodes participate equally - no SPOF• All data is replicated• Cluster transparently survives...
  • 25. Fault-Tolerant• All nodes participate equally - no SPOF• All data is replicated• Cluster transparently survives... • node failure
  • 26. Fault-Tolerant• All nodes participate equally - no SPOF• All data is replicated• Cluster transparently survives... • node failure • network partitions
  • 27. Fault-Tolerant• All nodes participate equally - no SPOF• All data is replicated• Cluster transparently survives... • node failure • network partitions• Built on Erlang/OTP (designed for FT)
  • 28. Highly-Available
  • 29. Highly-Available• Any node can serve client requests
  • 30. Highly-Available• Any node can serve client requests• Fallbacks are used when nodes are down
  • 31. Highly-Available• Any node can serve client requests• Fallbacks are used when nodes are down• Always accepts read and write requests
  • 32. Highly-Available• Any node can serve client requests• Fallbacks are used when nodes are down• Always accepts read and write requests• Per-request quorums
  • 33. Built for the Web
  • 34. Built for the Web• HTTP is default (but not only) interface
  • 35. Built for the Web• HTTP is default (but not only) interface• Does HTTP/REST well (see Webmachine)
  • 36. Built for the Web• HTTP is default (but not only) interface• Does HTTP/REST well (see Webmachine)• Plays well with HTTP infrastructure - reverse proxy caches, load balancers, web servers
  • 37. Built for the Web• HTTP is default (but not only) interface• Does HTTP/REST well (see Webmachine)• Plays well with HTTP infrastructure - reverse proxy caches, load balancers, web servers• Suitable to many web applications
  • 38. Inspired byAmazon’s Dynamo
  • 39. Inspired byAmazon’s Dynamo• Masterless, peer-coordinated replication
  • 40. Inspired byAmazon’s Dynamo• Masterless, peer-coordinated replication• Consistent hashing
  • 41. Inspired byAmazon’s Dynamo• Masterless, peer-coordinated replication• Consistent hashing• Eventually consistent
  • 42. Inspired byAmazon’s Dynamo• Masterless, peer-coordinated replication• Consistent hashing• Eventually consistent• Quorum reads and writes
  • 43. Inspired byAmazon’s Dynamo• Masterless, peer-coordinated replication• Consistent hashing• Eventually consistent• Quorum reads and writes• Anti-entropy: read repair, hinted handoff
  • 44. Lab: Riak Basics
  • 45. Installing Riak
  • 46. Installing Riak• Download from our local server
  • 47. Installing Riak• Download from our local server• Download a package: http://downloads.basho.com/riak/ CURRENT
  • 48. Installing Riak• Download from our local server• Download a package: http://downloads.basho.com/riak/ CURRENT• Clone & build (need git and Erlang) : $ git clone git://github.com/basho/riak.git $ make all devrel
  • 49. You need `curl` apt-get install curl yum install curl
  • 50. Start the Cluster
  • 51. Start the Cluster$ surge-start.sh
  • 52. Start the Cluster$ surge-start.shdev1/bin/riak startdev2/bin/riak startdev3/bin/riak startdev4/bin/riak start
  • 53. Start the Cluster$ surge-start.shdev1/bin/riak startdev2/bin/riak startdev3/bin/riak startdev4/bin/riak startdev2/bin/riak-admin join dev1Sent join request to dev1dev3/bin/riak-admin join dev1Sent join request to dev1dev4/bin/riak-admin join dev1Sent join request to dev1
  • 54. Check its status
  • 55. Check its status$ dev1/bin/riak-admin member_status$ dev1/bin/riak-admin ring_status$ dev1/bin/riak-admin status
  • 56. PUT
  • 57. PUT$ surge-put.sh
  • 58. PUT$ surge-put.shEnter a key: your-key
  • 59. PUT$ surge-put.shEnter a key: your-keyEnter a value: your-value
  • 60. PUT$ surge-put.shEnter a key: your-keyEnter a value: your-valueEnter a write quorum value:
  • 61. PUT$ surge-put.shEnter a key: your-keyEnter a value: your-valueEnter a write quorum value:* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> PUT /riak/surge/your-key?returnbody=true&w=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*> Content-Type: text/plain> Content-Length: 10>
  • 62. PUT$ surge-put.shEnter a key: your-keyEnter a value: your-valueEnter a write quorum value:* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> PUT /riak/surge/your-key?returnbody=true&w=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*> Content-Type: text/plain> Content-Length: 10>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1qb3LYEpkzGNleL/k23G+LAA=< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Date: Tue, 27 Sep 2011 19:21:08 GMT< Content-Type: text/plain< Content-Length: 10<* Connection #0 to host 127.0.0.1 left intact* Closing connection #0your-value
  • 63. GET
  • 64. GET$ surge-get.sh
  • 65. GET$ surge-get.shEnter a key: your-key
  • 66. GET$ surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):
  • 67. GET$ surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> GET /riak/surge/your-key?r=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>
  • 68. GET$ surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> GET /riak/surge/your-key?r=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1qb3LYEpkzGNleL/k23G+LAA=< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Last-Modified: Tue, 27 Sep 2011 19:01:45 GMT< ETag: "51h3q7RjTNaHWYpO4P0MJj"< Date: Tue, 27 Sep 2011 19:31:01 GMT< Content-Type: text/plain< Content-Length: 10<* Connection #0 to host 127.0.0.1 left intact* Closing connection #0your-value
  • 69. GET$ surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> GET /riak/surge/your-key?r=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1qb3LYEpkzGNleL/k23G+LAA=< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Last-Modified: Tue, 27 Sep 2011 19:01:45 GMT< ETag: "51h3q7RjTNaHWYpO4P0MJj"< Date: Tue, 27 Sep 2011 19:31:01 GMT< Content-Type: text/plain vector clock< Content-Length: 10<* Connection #0 to host 127.0.0.1 left intact* Closing connection #0your-value
  • 70. GET$ surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> GET /riak/surge/your-key?r=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1qb3LYEpkzGNleL/k23G+LAA=< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Last-Modified: Tue, 27 Sep 2011 19:01:45 GMT< ETag: "51h3q7RjTNaHWYpO4P0MJj"< Date: Tue, 27 Sep 2011 19:31:01 GMT< Content-Type: text/plain< Content-Length: 10<* Connection #0 to host 127.0.0.1 left intact* Closing connection #0your-value caching headers
  • 71. GET$ surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> GET /riak/surge/your-key?r=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1qb3LYEpkzGNleL/k23G+LAA=< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Last-Modified: Tue, 27 Sep 2011 19:01:45 GMT< ETag: "51h3q7RjTNaHWYpO4P0MJj"< Date: Tue, 27 Sep 2011 19:31:01 GMT< Content-Type: text/plain< Content-Length: 10<* Connection #0 to host 127.0.0.1 left intact* Closing connection #0your-value content-type
  • 72. DELETE
  • 73. DELETE$ surge-delete.sh
  • 74. DELETE$ surge-delete.shType a key: your-key
  • 75. DELETE$ surge-delete.shType a key: your-key* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> DELETE /riak/surge/your-key HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>
  • 76. DELETE$ surge-delete.shType a key: your-key* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> DELETE /riak/surge/your-key HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>< HTTP/1.1 204 No Content< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Date: Tue, 27 Sep 2011 19:33:59 GMT< Content-Type: text/plain< Content-Length: 0<* Connection #0 to host 127.0.0.1 left intact* Closing connection #0
  • 77. Kill two nodes
  • 78. Kill two nodes$ dev4/bin/riak stop
  • 79. Kill two nodes$ dev4/bin/riak stopok
  • 80. Kill two nodes$ dev4/bin/riak stopok$ dev3/bin/riak stop
  • 81. Kill two nodes$ dev4/bin/riak stopok$ dev3/bin/riak stopok
  • 82. Try GETting your key
  • 83. Try GETting your key$ . ~/Desktop/surge/surge-get.sh
  • 84. Try GETting your key$ . ~/Desktop/surge/surge-get.shEnter a key: your-key
  • 85. Try GETting your key$ . ~/Desktop/surge/surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):
  • 86. Try GETting your key$ . ~/Desktop/surge/surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> GET /riak/surge/your-key?r=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>
  • 87. Try GETting your key$ . ~/Desktop/surge/surge-get.shEnter a key: your-keyEnter a read quorum value (default: quorum):* About to connect() to 127.0.0.1 port 8091 (#0)* Trying 127.0.0.1... connected* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)> GET /riak/surge/your-key?r=quorum HTTP/1.1> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8rzlib/1.2.5> Host: 127.0.0.1:8091> Accept: */*>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1qb3LYEpkzGNleL/k23G+LAA=< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Last-Modified: Tue, 27 Sep 2011 19:50:07 GMT< ETag: "51h3q7RjTNaHWYpO4P0MJj"< Date: Tue, 27 Sep 2011 19:51:10 GMT< Content-Type: text/plain< Content-Length: 10<* Connection #0 to host 127.0.0.1 left intact* Closing connection #0your-value
  • 88. Riak Architecture
  • 89. Key-Value Data Model
  • 90. Key-Value Data Model&#8226; All data (objects) are referenced by keys mark beth sean
  • 91. Key-Value Data Model n_val allow_mult quora&#8226; All data (objects) are people referenced by keys mark&#8226; Keys are grouped into buckets beth sean
  • 92. Key-Value Data Model n_val allow_mult quora&#8226; All data (objects) are people referenced by keys mark&#8226; Keys are grouped into buckets beth sean&#8226; Simple operations: get, put, delete
  • 93. Key-Value Data Model&#8226; All data (objects) are referenced by keys people/beth&#8226; Keys are grouped into vclock: ... content-type: text/html buckets last-mod: 20101108T... links: ...&#8226; Simple operations: get, put, delete <html><head>....&#8226; Object is composed of metadata and value
  • 94. Consistent Hashing & The Ring
  • 95. Consistent Hashing & The Ring&#8226; 160-bit integer keyspace 0 2 160/4 2 160/2
  • 96. Consistent Hashing & The Ring&#8226; 160-bit integer keyspace 0&#8226; Divided into &#64257;xed number of evenly-sized partitions 32 partitions 2 160/4 2 160/2
  • 97. Consistent Hashing & The Ring node 0 node 1&#8226; 160-bit integer node 2 keyspace 0 node 3&#8226; Divided into &#64257;xed number of evenly-sized partitions 32 partitions 2 160/4&#8226; Partitions are claimed by nodes in the cluster 2 160/2
  • 98. Consistent Hashing & The Ring node 0 node 1&#8226; 160-bit integer node 2 keyspace node 3&#8226; Divided into &#64257;xed number of evenly-sized partitions&#8226; Partitions are claimed by nodes in the cluster&#8226; Replicas go to the N partitions following the key
  • 99. Consistent Hashing & The Ring node 0 node 1&#8226; 160-bit integer node 2 keyspace node 3&#8226; Divided into &#64257;xed number of evenly-sized partitions&#8226; Partitions are claimed by N=3 nodes in the cluster&#8226; Replicas go to the N partitions following the key hash(“conferences/surge”)
  • 100. Request Quorums
  • 101. Request Quorums&#8226; Every request contacts all replicas of key
  • 102. Request Quorums&#8226; Every request contacts all replicas of key&#8226; N - number of replicas (default 3)
  • 103. Request Quorums&#8226; Every request contacts all replicas of key&#8226; N - number of replicas (default 3)&#8226; R - read quorum
  • 104. Request Quorums&#8226; Every request contacts all replicas of key&#8226; N - number of replicas (default 3)&#8226; R - read quorum&#8226; W - write quorum
  • 105. Vector Clocks
  • 106. Vector Clocks&#8226; Every node has an ID (changed in 1.0)
  • 107. Vector Clocks&#8226; Every node has an ID (changed in 1.0)&#8226; Send last-seen vector clock in every “put” or “delete” request
  • 108. Vector Clocks&#8226; Every node has an ID (changed in 1.0)&#8226; Send last-seen vector clock in every “put” or “delete” request&#8226; Riak tracks history of updates
  • 109. Vector Clocks&#8226; Every node has an ID (changed in 1.0)&#8226; Send last-seen vector clock in every “put” or “delete” request&#8226; Riak tracks history of updates &#8226; Auto-resolves stale versions
  • 110. Vector Clocks&#8226; Every node has an ID (changed in 1.0)&#8226; Send last-seen vector clock in every “put” or “delete” request&#8226; Riak tracks history of updates &#8226; Auto-resolves stale versions &#8226; Lets you decide con&#64258;icts
  • 111. Vector Clockshttp://blog.basho.com/2010/01/29/why-vector-clocks-are-easy/&#8226; Every node has an ID (changed in 1.0)&#8226; Send last-seen vector clock in every “put” or “delete” request&#8226; Riak tracks history of updates &#8226; Auto-resolves stale versions &#8226; Lets you decide con&#64258;icts
  • 112. Hinted Handoff
  • 113. Hinted Handoff&#8226; Node fails X X X X X X X X
  • 114. Hinted Handoff&#8226; Node fails X X&#8226; Requests go to fallback X X X X X X hash(“conferences/surge”)
  • 115. Hinted Handoff&#8226; Node fails&#8226; Requests go to fallback&#8226; Node comes back hash(“conferences/surge”)
  • 116. Hinted Handoff&#8226; Node fails&#8226; Requests go to fallback&#8226; Node comes back&#8226; “Handoff” - data returns to recovered node hash(“conferences/surge”)
  • 117. Hinted Handoff&#8226; Node fails&#8226; Requests go to fallback&#8226; Node comes back&#8226; “Handoff” - data returns to recovered node&#8226; Normal operations resume hash(“conferences/surge”)
  • 118. Anatomy of a Request get(“conferences/surge”)
  • 119. Anatomy of a Request get(“conferences/surge”)client Riak
  • 120. Anatomy of a Request get(“conferences/surge”)client Riak Get Handler (FSM)
  • 121. Anatomy of a Request get(“conferences/surge”)client Riak hash(“conferences/oredev”) Get Handler (FSM) == 10, 11, 12
  • 122. Anatomy of a Request get(“conferences/surge”) client Riak hash(“conferences/oredev”) Get Handler (FSM) == 10, 11, 12 Coordinating node Cluster6 7 8 9 10 11 12 13 14 15 16 The Ring
  • 123. Anatomy of a Request get(“conferences/surge”) client Riak Get Handler (FSM) get(“conferences/oredev”) Coordinating node Cluster6 7 8 9 10 11 12 13 14 15 16 The Ring
  • 124. Anatomy of a Request get(“conferences/surge”) client Riak R=2 Get Handler (FSM) Coordinating node Cluster6 7 8 9 10 11 12 13 14 15 16 The Ring
  • 125. Anatomy of a Request get(“conferences/surge”) client Riak R=2 v1 Get Handler (FSM) Coordinating node Cluster6 7 8 9 10 11 12 13 14 15 16 The Ring
  • 126. Anatomy of a Request get(“conferences/surge”) client RiakR=2 v1 v2 Get Handler (FSM)
  • 127. Anatomy of a Request get(“conferences/surge”) client v2 RiakR=2 v2 Get Handler (FSM)
  • 128. Anatomy of a Request get(“conferences/surge”) v2
  • 129. Read Repair get(“conferences/surge”) client v2 Riak R=2 v1 v2 Get Handler (FSM) Coordinating node Cluster6 7 8 9 10 11 12 13 14 15 16 v1 v2
  • 130. Read Repair get(“conferences/surge”) client v2 Riak R=2 v2 Get Handler (FSM) Coordinating node Cluster6 7 8 9 10 11 12 13 14 15 16 v1 v2
  • 131. Read Repair get(“conferences/surge”) client v2 Riak R=2 v2 Get Handler (FSM) Coordinating node Cluster6 7 8 9 10 11 12 13 14 15 16 v1 v1 v2
  • 132. Read Repair get(“conferences/surge”) client v2 Riak R=2 v2 Get Handler (FSM) Coordinating node Cluster v2 v26 7 8 9 10 11 12 13 14 15 16 v2 v2 v2
  • 133. Riak ArchitectureErlang/OTP Runtime
  • 134. Riak ArchitectureErlang/OTP Runtime Riak KV
  • 135. Riak ArchitectureErlang/OTP Runtime Client APIs Riak KV
  • 136. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Riak KV
  • 137. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Riak KV
  • 138. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Riak KV
  • 139. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination Riak KV
  • 140. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce Riak KV
  • 141. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce Riak Core Riak KV
  • 142. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing Riak Core Riak KV
  • 143. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing membership Riak Core Riak KV
  • 144. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing handoff membership Riak Core Riak KV
  • 145. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing handoff membership node-liveness Riak Core Riak KV
  • 146. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing handoff gossip membership node-liveness Riak Core Riak KV
  • 147. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing handoff gossip membership node-liveness buckets Riak Core Riak KV
  • 148. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing handoff gossip membership node-liveness buckets Riak Core vnode master Riak KV
  • 149. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing handoff gossip membership node-liveness buckets Riak Core vnode master vnodes Riak KV
  • 150. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing handoff gossip membership node-liveness buckets Riak Core vnode master vnodes storage backend Riak KV
  • 151. Riak ArchitectureErlang/OTP Runtime Client APIs HTTP Protocol Buffers Erlang local client Request Coordination get put delete map-reduce consistent hashing handoff gossip membership node-liveness buckets Riak Core vnode master vnodes Workers storage backend Riak KV
  • 152. Modeling & Querying
  • 153. Application Design
  • 154. Application Design&#8226; No intrinsic schema
  • 155. Application Design&#8226; No intrinsic schema&#8226; Your application de&#64257;nes the structure and semantics
  • 156. Application Design&#8226; No intrinsic schema&#8226; Your application de&#64257;nes the structure and semantics&#8226; Your application resolves con&#64258;icts (if you care)
  • 157. Modeling Tools
  • 158. Modeling Tools&#8226; Key-Value
  • 159. Modeling Tools&#8226; Key-Value&#8226; Links
  • 160. Modeling Tools&#8226; Key-Value&#8226; Links&#8226; Full-text Search
  • 161. Modeling Tools&#8226; Key-Value&#8226; Links&#8226; Full-text Search&#8226; Secondary Indexes (2I)
  • 162. Modeling Tools&#8226; Key-Value&#8226; Links&#8226; Full-text Search&#8226; Secondary Indexes (2I)&#8226; MapReduce
  • 163. Key-Value
  • 164. Key-Value&#8226; Content-Types
  • 165. Key-Value&#8226; Content-Types&#8226; Denormalize
  • 166. Key-Value&#8226; Content-Types&#8226; Denormalize&#8226; Meaningful or “guessable” keys
  • 167. Key-Value&#8226; Content-Types&#8226; Denormalize&#8226; Meaningful or “guessable” keys &#8226; Composites
  • 168. Key-Value&#8226; Content-Types&#8226; Denormalize&#8226; Meaningful or “guessable” keys &#8226; Composites &#8226; Time-boxing
  • 169. Key-Value&#8226; Content-Types&#8226; Denormalize&#8226; Meaningful or “guessable” keys &#8226; Composites &#8226; Time-boxing&#8226; References (value is a key or list)
  • 170. Links
  • 171. Links&#8226; Lightweight relationships, like <a>
  • 172. Links&#8226; Lightweight relationships, like <a>&#8226; Includes a “tag”
  • 173. Links&#8226; Lightweight relationships, like <a>&#8226; Includes a “tag”&#8226; Built-in traversal op (“walking”) GET /riak/b/k/[bucket],[tag],[keep]
  • 174. Links&#8226; Lightweight relationships, like <a>&#8226; Includes a “tag”&#8226; Built-in traversal op (“walking”) GET /riak/b/k/[bucket],[tag],[keep]&#8226; Limited in number (part of meta)
  • 175. Full-text Search
  • 176. Full-text Search&#8226; Designed for searching prose
  • 177. Full-text Search&#8226; Designed for searching prose&#8226; Lucene/Solr-like query interface
  • 178. Full-text Search&#8226; Designed for searching prose&#8226; Lucene/Solr-like query interface&#8226; Automatically index K/V values
  • 179. Full-text Search&#8226; Designed for searching prose&#8226; Lucene/Solr-like query interface&#8226; Automatically index K/V values&#8226; Input to MapReduce
  • 180. Full-text Search&#8226; Designed for searching prose&#8226; Lucene/Solr-like query interface&#8226; Automatically index K/V values&#8226; Input to MapReduce&#8226; Customizable index schemas
  • 181. Secondary Indexes
  • 182. Secondary Indexes&#8226; De&#64257;ned as metadata
  • 183. Secondary Indexes&#8226; De&#64257;ned as metadata&#8226; Two index types: _int and _bin
  • 184. Secondary Indexes&#8226; De&#64257;ned as metadata&#8226; Two index types: _int and _bin&#8226; Two query types: equal and range
  • 185. Secondary Indexes&#8226; De&#64257;ned as metadata&#8226; Two index types: _int and _bin&#8226; Two query types: equal and range&#8226; Input to MapReduce
  • 186. MapReduce
  • 187. MapReduce&#8226; For more involved queries
  • 188. MapReduce&#8226; For more involved queries &#8226; Specify input keys
  • 189. MapReduce&#8226; For more involved queries &#8226; Specify input keys &#8226; Process data in “map” and “reduce” functions
  • 190. MapReduce&#8226; For more involved queries &#8226; Specify input keys &#8226; Process data in “map” and “reduce” functions &#8226; JavaScript or Erlang
  • 191. MapReduce&#8226; For more involved queries &#8226; Specify input keys &#8226; Process data in “map” and “reduce” functions &#8226; JavaScript or Erlang&#8226; Not tuned for batch processing
  • 192. Lab: Querying
  • 193. Lab: Walk Links
  • 194. Lab: Walk Links&#8226; Store an object with a Link
  • 195. Lab: Walk Links&#8226; Store an object with a Link&#8226; Store the target of the Link
  • 196. Lab: Walk Links&#8226; Store an object with a Link&#8226; Store the target of the Link&#8226; Walk from one to the other
  • 197. Lab: Store Links
  • 198. Lab: Store Links$ ./store-linked.sh
  • 199. Lab: Store Links$ ./store-linked.shEnter the origin key: seanEnter the target key: ianEnter the links tag: coworker
  • 200. Lab: Store Links$ ./store-linked.shEnter the origin key: seanEnter the target key: ianEnter the links tag: coworker*** Storing the origin **** About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/sean HTTP/1.1> Link: </riak/surge/ian>;riaktag="coworker"...< HTTP/1.1 204 No Content...
  • 201. Lab: Store Links$ ./store-linked.shEnter the origin key: seanEnter the target key: ianEnter the links tag: coworker*** Storing the origin **** About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/sean HTTP/1.1> Link: </riak/surge/ian>;riaktag="coworker"...< HTTP/1.1 204 No Content...
  • 202. Lab: Store Links$ ./store-linked.shEnter the origin key: seanEnter the target key: ianEnter the links tag: coworker*** Storing the origin **** About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/sean HTTP/1.1> Link: </riak/surge/ian>;riaktag="coworker"...< HTTP/1.1 204 No Content...
  • 203. Lab: Store Links$ ./store-linked.shEnter the origin key: seanEnter the target key: ianEnter the links tag: coworker*** Storing the origin **** About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/sean HTTP/1.1> Link: </riak/surge/ian>;riaktag="coworker"...< HTTP/1.1 204 No Content...
  • 204. Lab: Store Links$ ./store-linked.shEnter the origin key: seanEnter the target key: ianEnter the links tag: coworker*** Storing the origin **** About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/sean HTTP/1.1> Link: </riak/surge/ian>;riaktag="coworker"...< HTTP/1.1 204 No Content...*** Storing the target **** About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/ian HTTP/1.1...< HTTP/1.1 204 No Content
  • 205. Lab: Store Links$ ./store-linked.shEnter the origin key: seanEnter the target key: ianEnter the links tag: coworker*** Storing the origin **** About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/sean HTTP/1.1> Link: </riak/surge/ian>;riaktag="coworker"...< HTTP/1.1 204 No Content...*** Storing the target **** About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/ian HTTP/1.1...< HTTP/1.1 204 No Content
  • 206. Lab: Walk Links (1/3)
  • 207. Lab: Walk Links (1/3)$ ./walk-linked.sh
  • 208. Lab: Walk Links (1/3)$ ./walk-linked.shEnter the origin key: seanEnter the link spec (default: _,_,_):
  • 209. Lab: Walk Links (1/3)$ ./walk-linked.shEnter the origin key: seanEnter the link spec (default: _,_,_):...> GET /riak/surge/sean/_,_,_ HTTP/1.1...
  • 210. Lab: Walk Links (1/3)$ ./walk-linked.shEnter the origin key: seanEnter the link spec (default: _,_,_):...> GET /riak/surge/sean/_,_,_ HTTP/1.1...
  • 211. Lab: Walk Links (1/3)$ ./walk-linked.shEnter the origin key: seanEnter the link spec (default: _,_,_):...> GET /riak/surge/sean/_,_,_ HTTP/1.1...
  • 212. Lab: Walk Links (1/3)$ ./walk-linked.shEnter the origin key: seanEnter the link spec (default: _,_,_):...> GET /riak/surge/sean/_,_,_ HTTP/1.1...< HTTP/1.1 200 OK< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Expires: Tue, 27 Sep 2011 20:51:37 GMT< Date: Tue, 27 Sep 2011 20:41:37 GMT< Content-Type: multipart/mixed; boundary=J6O2SZfLfSEdAv5dv3mttR7AVOF< Content-Length: 438<
  • 213. Lab: Walk Links (1/3)$ ./walk-linked.shEnter the origin key: seanEnter the link spec (default: _,_,_):...> GET /riak/surge/sean/_,_,_ HTTP/1.1...< HTTP/1.1 200 OK< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Expires: Tue, 27 Sep 2011 20:51:37 GMT< Date: Tue, 27 Sep 2011 20:41:37 GMT< Content-Type: multipart/mixed; boundary=J6O2SZfLfSEdAv5dv3mttR7AVOF< Content-Length: 438<
  • 214. Lab: Walk Links (1/3)$ ./walk-linked.shEnter the origin key: seanEnter the link spec (default: _,_,_):...> GET /riak/surge/sean/_,_,_ HTTP/1.1...< HTTP/1.1 200 OK< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Expires: Tue, 27 Sep 2011 20:51:37 GMT< Date: Tue, 27 Sep 2011 20:41:37 GMT< Content-Type: multipart/mixed; boundary=J6O2SZfLfSEdAv5dv3mttR7AVOF< Content-Length: 438<--J6O2SZfLfSEdAv5dv3mttR7AVOFContent-Type: multipart/mixed; boundary=C1NUMpwbmSvb7CbqEAy1KdYRiUH--C1NUMpwbmSvb7CbqEAy1KdYRiUHX-Riak-Vclock: a85hYGBgzGDKBVIcMRuuc/k1GU/KYEpkymNl0Nzw7ThfFgA=Location: /riak/surge/ianContent-Type: text/plainLink: </riak/surge>; rel="up"Etag: 51h3q7RjTNaHWYpO4P0MJjLast-Modified: Tue, 27 Sep 2011 20:38:01 GMTtarget--C1NUMpwbmSvb7CbqEAy1KdYRiUH----J6O2SZfLfSEdAv5dv3mttR7AVOF--
  • 215. Lab: Walk Links (1/3)$ ./walk-linked.shEnter the origin key: seanEnter the link spec (default: _,_,_):...> GET /riak/surge/sean/_,_,_ HTTP/1.1...< HTTP/1.1 200 OK< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Expires: Tue, 27 Sep 2011 20:51:37 GMT< Date: Tue, 27 Sep 2011 20:41:37 GMT< Content-Type: multipart/mixed; boundary=J6O2SZfLfSEdAv5dv3mttR7AVOF< Content-Length: 438<--J6O2SZfLfSEdAv5dv3mttR7AVOFContent-Type: multipart/mixed; boundary=C1NUMpwbmSvb7CbqEAy1KdYRiUH--C1NUMpwbmSvb7CbqEAy1KdYRiUHX-Riak-Vclock: a85hYGBgzGDKBVIcMRuuc/k1GU/KYEpkymNl0Nzw7ThfFgA=Location: /riak/surge/ianContent-Type: text/plainLink: </riak/surge>; rel="up"Etag: 51h3q7RjTNaHWYpO4P0MJjLast-Modified: Tue, 27 Sep 2011 20:38:01 GMTtarget--C1NUMpwbmSvb7CbqEAy1KdYRiUH----J6O2SZfLfSEdAv5dv3mttR7AVOF--
  • 216. Lab: Walk Links (2/3)
  • 217. Lab: Walk Links (2/3)Enter the origin key: seanEnter the link spec (default: _,_,_): surge,_,_
  • 218. Lab: Walk Links (2/3)Enter the origin key: seanEnter the link spec (default: _,_,_): surge,_,_> GET /riak/surge/sean/surge,_,_ HTTP/1.1...
  • 219. Lab: Walk Links (2/3)Enter the origin key: seanEnter the link spec (default: _,_,_): surge,_,_> GET /riak/surge/sean/surge,_,_ HTTP/1.1...>< HTTP/1.1 200 OK< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Expires: Tue, 27 Sep 2011 20:52:53 GMT< Date: Tue, 27 Sep 2011 20:42:53 GMT< Content-Type: multipart/mixed; boundary=CsxMIsO9tfadrRJ7EQ3XL2ivQ4f< Content-Length: 438<--CsxMIsO9tfadrRJ7EQ3XL2ivQ4fContent-Type: multipart/mixed; boundary=I3U33LkzkqJi6HtbwsU0qRd4k4y--I3U33LkzkqJi6HtbwsU0qRd4k4yX-Riak-Vclock: a85hYGBgzGDKBVIcMRuuc/k1GU/KYEpkymNl0Nzw7ThfFgA=Location: /riak/surge/ianContent-Type: text/plainLink: </riak/surge>; rel="up"Etag: 51h3q7RjTNaHWYpO4P0MJjLast-Modified: Tue, 27 Sep 2011 20:38:01 GMTtarget--I3U33LkzkqJi6HtbwsU0qRd4k4y----CsxMIsO9tfadrRJ7EQ3XL2ivQ4f--
  • 220. Lab: Walk Links (3/3)
  • 221. Lab: Walk Links (3/3)Enter the origin key: seanEnter the link spec (default: _,_,_): foo,_,_
  • 222. Lab: Walk Links (3/3)Enter the origin key: seanEnter the link spec (default: _,_,_): foo,_,_...> GET /riak/surge/sean/foo,_,_ HTTP/1.1< HTTP/1.1 200 OK< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Expires: Tue, 27 Sep 2011 20:53:08 GMT< Date: Tue, 27 Sep 2011 20:43:08 GMT< Content-Type: multipart/mixed; boundary=3AsxaHhVMlDEQCakLSmNqQUTS4Y< Content-Length: 172<--3AsxaHhVMlDEQCakLSmNqQUTS4YContent-Type: multipart/mixed; boundary=Ivtq9RgHpydECNEZOnHpiqHcFYl--Ivtq9RgHpydECNEZOnHpiqHcFYl----3AsxaHhVMlDEQCakLSmNqQUTS4Y--
  • 223. Lab: Secondary Indexes
  • 224. Lab: Secondary Indexes&#8226; Create some objects with indexes
  • 225. Lab: Secondary Indexes&#8226; Create some objects with indexes&#8226; Query the index for their keys
  • 226. Lab: Secondary Indexes&#8226; Create some objects with indexes&#8226; Query the index for their keys&#8226; Query input to MapReduce
  • 227. Lab: Create 2I Objects
  • 228. Lab: Create 2I Objects$ ./store-indexed.sh
  • 229. Lab: Create 2I Objects$ ./store-indexed.shEnter the number of objects to create: 40
  • 230. Lab: Create 2I Objects$ ./store-indexed.shEnter the number of objects to create: 40* About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/surgeobj1?returnbody=true HTTP/1.1> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8rzlib/1.2.3> Host: localhost:8091> Accept: */*> Content-Type: application/json> X-Riak-Index-surgeobj_int: 1> Content-Length: 14>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1uZVkMCUy5rEyHDn57ThfFgA=< x-riak-index-surgeobj_int: 1< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Date: Tue, 27 Sep 2011 22:27:16 GMT< Content-Type: application/json< Content-Length: 14<* Connection #0 to host localhost left intact* Closing connection #0{"surgeobj":1} ...
  • 231. Lab: Create 2I Objects$ ./store-indexed.shEnter the number of objects to create: 40 key* About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/surgeobj1?returnbody=true HTTP/1.1> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8rzlib/1.2.3> Host: localhost:8091> Accept: */*> Content-Type: application/json> X-Riak-Index-surgeobj_int: 1> Content-Length: 14>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1uZVkMCUy5rEyHDn57ThfFgA=< x-riak-index-surgeobj_int: 1< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Date: Tue, 27 Sep 2011 22:27:16 GMT< Content-Type: application/json< Content-Length: 14<* Connection #0 to host localhost left intact* Closing connection #0{"surgeobj":1} ...
  • 232. Lab: Create 2I Objects$ ./store-indexed.shEnter the number of objects to create: 40* About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> PUT /riak/surge/surgeobj1?returnbody=true HTTP/1.1> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8rzlib/1.2.3> Host: localhost:8091> Accept: */* index header> Content-Type: application/json> X-Riak-Index-surgeobj_int: 1> Content-Length: 14>< HTTP/1.1 200 OK< X-Riak-Vclock: a85hYGBgzGDKBVIcR4M2cvs1uZVkMCUy5rEyHDn57ThfFgA=< x-riak-index-surgeobj_int: 1< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Link: </riak/surge>; rel="up"< Date: Tue, 27 Sep 2011 22:27:16 GMT< Content-Type: application/json< Content-Length: 14<* Connection #0 to host localhost left intact* Closing connection #0{"surgeobj":1} ...
  • 233. Lab: Query 2I (1/2)
  • 234. Lab: Query 2I (1/2)$ ./query-indexed.sh
  • 235. Lab: Query 2I (1/2)$ ./query-indexed.shQuery on range or equality? (r/e) eIndex value: 10
  • 236. Lab: Query 2I (1/2)$ ./query-indexed.shQuery on range or equality? (r/e) eIndex value: 10* About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> GET /buckets/surge/index/surgeobj_int/10 HTTP/1.1> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7OpenSSL/0.9.8r zlib/1.2.3> Host: localhost:8091> Accept: */*>< HTTP/1.1 200 OK< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Date: Tue, 27 Sep 2011 22:27:27 GMT< Content-Type: application/json< Content-Length: 23<* Connection #0 to host localhost left intact* Closing connection #0{"keys":["surgeobj10"]}
  • 237. Lab: Query 2I (2/2)
  • 238. Lab: Query 2I (2/2)Query on range or equality? (r/e) rRange start: 5Range end: 15
  • 239. Lab: Query 2I (2/2)Query on range or equality? (r/e) rRange start: 5Range end: 15* About to connect() to localhost port 8091 (#0)* Trying 127.0.0.1... connected* Connected to localhost (127.0.0.1) port 8091 (#0)> GET /buckets/surge/index/surgeobj_int/5/15 HTTP/1.1> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7OpenSSL/0.9.8r zlib/1.2.3> Host: localhost:8091> Accept: */*>< HTTP/1.1 200 OK< Vary: Accept-Encoding< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Date: Tue, 27 Sep 2011 22:27:36 GMT< Content-Type: application/json< Content-Length: 148<* Connection #0 to host localhost left intact* Closing connection #0{"keys":["surgeobj12","surgeobj15","surgeobj6","surgeobj5","surgeobj13","surgeobj8","surgeobj11","surgeobj14","surgeobj9","surgeobj10","surgeobj7"]}
  • 240. Lab: 2I MapReduce
  • 241. Lab: 2I MapReduce$ ./mapred-indexed.sh
  • 242. Lab: 2I MapReduce$ ./mapred-indexed.shQuery on range or equality? (r/e) rRange start: 35Range end: 40
  • 243. Lab: 2I MapReduce$ ./mapred-indexed.shQuery on range or equality? (r/e) rRange start: 35Range end: 40Executing MapReduce:{ "inputs":{ "bucket":"surge", "index":"surgeobj_int" ,"start":35,"end":40},"query":[ {"map":{"name":"Riak.mapValuesJson","language":"javascript","keep":true}} ]}
  • 244. Lab: 2I MapReduce$ ./mapred-indexed.shQuery on range or equality? (r/e) rRange start: 35Range end: 40Executing MapReduce:{ "inputs":{ "bucket":"surge", "index":"surgeobj_int" ,"start":35,"end":40},"query":[ {"map":{"name":"Riak.mapValuesJson","language":"javascript","keep":true}} ]}> POST /mapred HTTP/1.1> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3> Host: localhost:8091> Accept: */*> Content-Type: application/json> Content-Length: 164>< HTTP/1.1 200 OK< Server: MochiWeb/1.1 WebMachine/1.9.0 (participate in the frantic)< Date: Wed, 28 Sep 2011 01:41:53 GMT< Content-Type: application/json< Content-Length: 97<* Connection #0 to host localhost left intact* Closing connection #0[{"surgeobj":35},{"surgeobj":40},{"surgeobj":36},{"surgeobj":37},{"surgeobj":39},{"surgeobj":38}]
  • 245. Riak Operations
  • 246. Con&#64257;guration
  • 247. File Locations
  • 248. File Locations&#8226; Con&#64257;guration
  • 249. File Locations&#8226; Con&#64257;guration &#8226; /etc/riak
  • 250. File Locations&#8226; Con&#64257;guration &#8226; /etc/riak&#8226; Binaries
  • 251. File Locations&#8226; Con&#64257;guration &#8226; /etc/riak&#8226; Binaries &#8226; /usr/sbin/riak
  • 252. File Locations&#8226; Con&#64257;guration &#8226; /etc/riak&#8226; Binaries &#8226; /usr/sbin/riak &#8226; /usr/sbin/riak-admin
  • 253. File Locations&#8226; Con&#64257;guration &#8226; /etc/riak&#8226; Binaries &#8226; /usr/sbin/riak &#8226; /usr/sbin/riak-admin &#8226; /usr/[lib,lib64]/riak
  • 254. File Locations&#8226; Con&#64257;guration &#8226; Logs &#8226; /etc/riak&#8226; Binaries &#8226; /usr/sbin/riak &#8226; /usr/sbin/riak-admin &#8226; /usr/[lib,lib64]/riak
  • 255. File Locations&#8226; Con&#64257;guration &#8226; Logs &#8226; /etc/riak &#8226; /var/log/riak&#8226; Binaries &#8226; /usr/sbin/riak &#8226; /usr/sbin/riak-admin &#8226; /usr/[lib,lib64]/riak
  • 256. File Locations&#8226; Con&#64257;guration &#8226; Logs &#8226; /etc/riak &#8226; /var/log/riak&#8226; Binaries &#8226; Data &#8226; /usr/sbin/riak &#8226; /usr/sbin/riak-admin &#8226; /usr/[lib,lib64]/riak
  • 257. File Locations&#8226; Con&#64257;guration &#8226; Logs &#8226; /etc/riak &#8226; /var/log/riak&#8226; Binaries &#8226; Data &#8226; /usr/sbin/riak &#8226; /var/lib/riak &#8226; /usr/sbin/riak-admin &#8226; /usr/[lib,lib64]/riak
  • 258. File Locations&#8226; Con&#64257;guration &#8226; Logs &#8226; /etc/riak &#8226; /var/log/riak&#8226; Binaries &#8226; Data &#8226; /usr/sbin/riak &#8226; /var/lib/riak &#8226; /usr/sbin/riak-admin &#8226; Handles / Temp Files &#8226; /usr/[lib,lib64]/riak
  • 259. File Locations&#8226; Con&#64257;guration &#8226; Logs &#8226; /etc/riak &#8226; /var/log/riak&#8226; Binaries &#8226; Data &#8226; /usr/sbin/riak &#8226; /var/lib/riak &#8226; /usr/sbin/riak-admin &#8226; Handles / Temp Files &#8226; /usr/[lib,lib64]/riak &#8226; /tmp/riak
  • 260. /etc/riak/vm.args
  • 261. /etc/riak/vm.args&#8226; Overview
  • 262. /etc/riak/vm.args&#8226; Overview &#8226; Erlang VM con&#64257;guration settings.
  • 263. /etc/riak/vm.args&#8226; Overview &#8226; Erlang VM con&#64257;guration settings.&#8226; Important Settings
  • 264. /etc/riak/vm.args&#8226; Overview &#8226; Erlang VM con&#64257;guration settings.&#8226; Important Settings &#8226; Node name.
  • 265. /etc/riak/vm.args&#8226; Overview &#8226; Erlang VM con&#64257;guration settings.&#8226; Important Settings &#8226; Node name. &#8226; Security cookie.
  • 266. /etc/riak/vm.args&#8226; Overview &#8226; Erlang VM con&#64257;guration settings.&#8226; Important Settings &#8226; Node name. &#8226; Security cookie.&#8226; Documentation
  • 267. /etc/riak/vm.args&#8226; Overview &#8226; Erlang VM con&#64257;guration settings.&#8226; Important Settings &#8226; Node name. &#8226; Security cookie.&#8226; Documentation &#8226; http://www.erlang.org/doc/man/erl.html
  • 268. /etc/riak/vm.args
  • 269. /etc/riak/vm.args&#8226; Node Name & Security Cookie ## Name of the riak node
  • 270. /etc/riak/vm.args&#8226; Node Name & Security Cookie ## Name of the riak node -name riak@127.0.0.1
  • 271. /etc/riak/vm.args&#8226; Node Name & Security Cookie ## Name of the riak node -name riak@127.0.0.1 ## Cookie for distributed erlang
  • 272. /etc/riak/vm.args&#8226; Node Name & Security Cookie ## Name of the riak node -name riak@127.0.0.1 ## Cookie for distributed erlang -setcookie riak
  • 273. /etc/riak/app.con&#64257;g
  • 274. /etc/riak/ app.con&#64257;g&#8226; Overview
  • 275. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.
  • 276. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.&#8226; Important Settings
  • 277. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.&#8226; Important Settings &#8226; Ports
  • 278. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.&#8226; Important Settings &#8226; Ports &#8226; Directories
  • 279. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.&#8226; Important Settings &#8226; Ports &#8226; Directories &#8226; Number of Partitions
  • 280. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.&#8226; Important Settings &#8226; Ports &#8226; Directories &#8226; Number of Partitions &#8226; Storage Backend
  • 281. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.&#8226; Important Settings &#8226; Ports &#8226; Directories &#8226; Number of Partitions &#8226; Storage Backend&#8226; Documentation
  • 282. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.&#8226; Important Settings &#8226; Ports &#8226; Directories &#8226; Number of Partitions &#8226; Storage Backend&#8226; Documentation &#8226; http://wiki.basho.com/Con&#64257;guration-Files.html
  • 283. /etc/riak/ app.con&#64257;g&#8226; Overview &#8226; Riak (and dependency) con&#64257;guration settings.&#8226; Important Settings &#8226; Ports &#8226; Directories &#8226; Number of Partitions &#8226; Storage Backend&#8226; Documentation &#8226; http://wiki.basho.com/Con&#64257;guration-Files.html &#8226; Inline comments
  • 284. /etc/riak/app.con&#64257;g
  • 285. /etc/riak/ app.con&#64257;g&#8226; Storage Engine %% Storage_backend speci&#64257;es the Erlang module de&#64257;ning the storage
  • 286. /etc/riak/ app.con&#64257;g&#8226; Storage Engine %% Storage_backend speci&#64257;es the Erlang module de&#64257;ning the storage %% mechanism that will be used on this node.
  • 287. /etc/riak/ app.con&#64257;g&#8226; Storage Engine %% Storage_backend speci&#64257;es the Erlang module de&#64257;ning the storage %% mechanism that will be used on this node. {storage_backend, riak_kv_bitcask_backend},
  • 288. /etc/riak/ app.con&#64257;g&#8226; Storage Engine %% Storage_backend speci&#64257;es the Erlang module de&#64257;ning the storage %% mechanism that will be used on this node. {storage_backend, riak_kv_bitcask_backend},&#8226; About Storage Engines
  • 289. /etc/riak/ app.con&#64257;g&#8226; Storage Engine %% Storage_backend speci&#64257;es the Erlang module de&#64257;ning the storage %% mechanism that will be used on this node. {storage_backend, riak_kv_bitcask_backend},&#8226; About Storage Engines &#8226; Riak has pluggable storage engines. (Bitcask, Innostore, LevelDB)
  • 290. /etc/riak/ app.con&#64257;g&#8226; Storage Engine %% Storage_backend speci&#64257;es the Erlang module de&#64257;ning the storage %% mechanism that will be used on this node. {storage_backend, riak_kv_bitcask_backend},&#8226; About Storage Engines &#8226; Riak has pluggable storage engines. (Bitcask, Innostore, LevelDB) &#8226; Different engines have different tradeoffs.
  • 291. /etc/riak/ app.con&#64257;g&#8226; Storage Engine %% Storage_backend speci&#64257;es the Erlang module de&#64257;ning the storage %% mechanism that will be used on this node. {storage_backend, riak_kv_bitcask_backend},&#8226; About Storage Engines &#8226; Riak has pluggable storage engines. (Bitcask, Innostore, LevelDB) &#8226; Different engines have different tradeoffs. &#8226; Engine selection depends on shape of data.
  • 292. /etc/riak/ app.con&#64257;g&#8226; Storage Engine %% Storage_backend speci&#64257;es the Erlang module de&#64257;ning the storage %% mechanism that will be used on this node. {storage_backend, riak_kv_bitcask_backend},&#8226; About Storage Engines &#8226; Riak has pluggable storage engines. (Bitcask, Innostore, LevelDB) &#8226; Different engines have different tradeoffs. &#8226; Engine selection depends on shape of data. &#8226; More on this later.
  • 293. /etc/riak/ app.con&#64257;g%% Bitcask Config{bitcask, [ {data_root, "data/bitcask"} ]},{eleveldb, [ {data_root, “data/leveldb”} ]},
  • 294. /etc/riak/ app.con&#64257;g&#8226; File Locations%% Bitcask Config{bitcask, [ {data_root, "data/bitcask"} ]},{eleveldb, [ {data_root, “data/leveldb”} ]},
  • 295. /etc/riak/ app.con&#64257;g&#8226; File Locations%% Bitcask Config{bitcask, [ {data_root, "data/bitcask"} ]},{eleveldb, [ {data_root, “data/leveldb”} ]},
  • 296. /etc/riak/ app.con&#64257;g&#8226; File Locations%% Bitcask Config{bitcask, [ {data_root, "data/bitcask"} ]},{eleveldb, [ {data_root, “data/leveldb”} ]},
  • 297. /etc/riak/ app.con&#64257;g&#8226; File Locations%% Bitcask Config{bitcask, [ {data_root, "data/bitcask"} ]},{eleveldb, [ {data_root, “data/leveldb”} ]},
  • 298. /etc/riak/ app.con&#64257;g&#8226; File Locations%% Bitcask Config{bitcask, [ {data_root, "data/bitcask"} ]},{eleveldb, [ {data_root, “data/leveldb”}&#8226; ]},
  • 299. /etc/riak/ app.con&#64257;g%% http is a list of IP addresses and TCP ports that theRiak%% HTTP interface will bind.{http, [ {"127.0.0.1", 8091 } ]},%% pb_ip is the IP address that the Riak Protocol Buffersinterface%% will bind to. If this is undefined, the interface willnot run.{pb_ip, "127.0.0.1" },%% pb_port is the TCP port that the Riak Protocol Buffersinterface%% will bind to{pb_port, 8081 },
  • 300. /etc/riak/ app.con&#64257;g&#8226; HTTP & Protocol Buffers%% http is a list of IP addresses and TCP ports that theRiak%% HTTP interface will bind.{http, [ {"127.0.0.1", 8091 } ]},%% pb_ip is the IP address that the Riak Protocol Buffersinterface%% will bind to. If this is undefined, the interface willnot run.{pb_ip, "127.0.0.1" },%% pb_port is the TCP port that the Riak Protocol Buffersinterface%% will bind to{pb_port, 8081 },
  • 301. Securing Riak
  • 302. Securing Riak&#8226; Overview
  • 303. Securing Riak&#8226; Overview &#8226; Erlang has a “cookie” for “security.”
  • 304. Securing Riak&#8226; Overview &#8226; Erlang has a “cookie” for “security.” &#8226; Do not rely on it. Plain text.
  • 305. Securing Riak&#8226; Overview &#8226; Erlang has a “cookie” for “security.” &#8226; Do not rely on it. Plain text. &#8226; Riak assumes internal environment is trusted.
  • 306. Securing Riak&#8226; Overview &#8226; Erlang has a “cookie” for “security.” &#8226; Do not rely on it. Plain text. &#8226; Riak assumes internal environment is trusted.&#8226; Securing the HTTP Interface
  • 307. Securing Riak&#8226; Overview &#8226; Erlang has a “cookie” for “security.” &#8226; Do not rely on it. Plain text. &#8226; Riak assumes internal environment is trusted.&#8226; Securing the HTTP Interface &#8226; HTTP Auth via Proxy
  • 308. Securing Riak&#8226; Overview &#8226; Erlang has a “cookie” for “security.” &#8226; Do not rely on it. Plain text. &#8226; Riak assumes internal environment is trusted.&#8226; Securing the HTTP Interface &#8226; HTTP Auth via Proxy &#8226; Does support SSL
  • 309. Securing Riak&#8226; Overview &#8226; Erlang has a “cookie” for “security.” &#8226; Do not rely on it. Plain text. &#8226; Riak assumes internal environment is trusted.&#8226; Securing the HTTP Interface &#8226; HTTP Auth via Proxy &#8226; Does support SSL&#8226; Securing Protocol Buffers
  • 310. Securing Riak&#8226; Overview &#8226; Erlang has a “cookie” for “security.” &#8226; Do not rely on it. Plain text. &#8226; Riak assumes internal environment is trusted.&#8226; Securing the HTTP Interface &#8226; HTTP Auth via Proxy &#8226; Does support SSL&#8226; Securing Protocol Buffers &#8226; No security.
  • 311. Load Balancing
  • 312. Load Balancing&#8226; Overview
  • 313. Load Balancing&#8226; Overview &#8226; Any node can handle any request.
  • 314. Load Balancing&#8226; Overview &#8226; Any node can handle any request. &#8226; Makes load balancing easy.
  • 315. Load Balancing&#8226; Overview &#8226; Any node can handle any request. &#8226; Makes load balancing easy.&#8226; Load Balancing HTTP
  • 316. Load Balancing&#8226; Overview &#8226; Any node can handle any request. &#8226; Makes load balancing easy.&#8226; Load Balancing HTTP &#8226; HAProxy, nginx, etc...
  • 317. Load Balancing&#8226; Overview &#8226; Any node can handle any request. &#8226; Makes load balancing easy.&#8226; Load Balancing HTTP &#8226; HAProxy, nginx, etc...&#8226; Load Balancing Protocol Buffers
  • 318. Load Balancing&#8226; Overview &#8226; Any node can handle any request. &#8226; Makes load balancing easy.&#8226; Load Balancing HTTP &#8226; HAProxy, nginx, etc...&#8226; Load Balancing Protocol Buffers &#8226; Any TCP Load Balancer
  • 319. Load Balancing&#8226; Overview &#8226; Any node can handle any request. &#8226; Makes load balancing easy.&#8226; Load Balancing HTTP &#8226; HAProxy, nginx, etc...&#8226; Load Balancing Protocol Buffers &#8226; Any TCP Load Balancer&#8226; In General
  • 320. Load Balancing&#8226; Overview &#8226; Any node can handle any request. &#8226; Makes load balancing easy.&#8226; Load Balancing HTTP &#8226; HAProxy, nginx, etc...&#8226; Load Balancing Protocol Buffers &#8226; Any TCP Load Balancer&#8226; In General &#8226; Use “least connected” strategy.
  • 321. Storage Backends
  • 322. There are 5 to choose from
  • 323. There are 5 to choose from&#8226; Bitcask
  • 324. There are 5 to choose from&#8226; Bitcask&#8226; Innostore
  • 325. There are 5 to choose from&#8226; Bitcask&#8226; Innostore&#8226; LevelDB
  • 326. There are 5 to choose from&#8226; Bitcask&#8226; Innostore&#8226; LevelDB&#8226; Memory
  • 327. There are 5 to choose from&#8226; Bitcask&#8226; Innostore&#8226; LevelDB&#8226; Memory&#8226; Multi
  • 328. Bitcask
  • 329. Bitcask&#8226; A fast, append-only key-value store
  • 330. Bitcask&#8226; A fast, append-only key-value store&#8226; In memory key lookup table (key_dir)
  • 331. Bitcask&#8226; A fast, append-only key-value store&#8226; In memory key lookup table (key_dir)&#8226; Closed &#64257;les are immutable
  • 332. Bitcask&#8226; A fast, append-only key-value store&#8226; In memory key lookup table (key_dir)&#8226; Closed &#64257;les are immutable&#8226; Merging cleans up old data
  • 333. Bitcask&#8226; A fast, append-only key-value store&#8226; In memory key lookup table (key_dir)&#8226; Closed &#64257;les are immutable&#8226; Merging cleans up old data&#8226; Apache 2 license
  • 334. Innostore
  • 335. Innostore&#8226; Based on Embedded InnoDB
  • 336. Innostore&#8226; Based on Embedded InnoDB&#8226; Write ahead log plus B-tree storage
  • 337. Innostore&#8226; Based on Embedded InnoDB&#8226; Write ahead log plus B-tree storage&#8226; Similar characterics to the MySQL InnoDB plugin
  • 338. Innostore&#8226; Based on Embedded InnoDB&#8226; Write ahead log plus B-tree storage&#8226; Similar characterics to the MySQL InnoDB plugin&#8226; Manages which pages of the B-trees are in memory
  • 339. Innostore&#8226; Based on Embedded InnoDB&#8226; Write ahead log plus B-tree storage&#8226; Similar characterics to the MySQL InnoDB plugin&#8226; Manages which pages of the B-trees are in memory&#8226; GPL license
  • 340. LevelDB
  • 341. LevelDB&#8226; A Google developed key-value store
  • 342. LevelDB&#8226; A Google developed key-value store&#8226; Append-only
  • 343. LevelDB&#8226; A Google developed key-value store&#8226; Append-only&#8226; Multiple levels of SSTable-like structures
  • 344. LevelDB&#8226; A Google developed key-value store&#8226; Append-only&#8226; Multiple levels of SSTable-like structures&#8226; BSD license
  • 345. Cluster Capacity Planning
  • 346. Cluster Capacity Planning
  • 347. Cluster Capacity Planning&#8226; Overview
  • 348. Cluster Capacity Planning&#8226; Overview &#8226; There are MANY variables that affect performance.
  • 349. Cluster Capacity Planning&#8226; Overview &#8226; There are MANY variables that affect performance. &#8226; Safest route is to simulate load and see what happens.
  • 350. Cluster Capacity Planning&#8226; Overview &#8226; There are MANY variables that affect performance. &#8226; Safest route is to simulate load and see what happens. &#8226; basho_bench can help
  • 351. Cluster Capacity Planning&#8226; Overview &#8226; There are MANY variables that affect performance. &#8226; Safest route is to simulate load and see what happens. &#8226; basho_bench can help&#8226; Documentation
  • 352. Cluster Capacity Planning&#8226; Overview &#8226; There are MANY variables that affect performance. &#8226; Safest route is to simulate load and see what happens. &#8226; basho_bench can help&#8226; Documentation &#8226; http://wiki.basho.com/Cluster-Capacity- Planning.html
  • 353. Cluster Capacity Planning&#8226; Overview &#8226; There are MANY variables that affect performance. &#8226; Safest route is to simulate load and see what happens. &#8226; basho_bench can help&#8226; Documentation &#8226; http://wiki.basho.com/Cluster-Capacity- Planning.html &#8226; http://wiki.basho.com/System- Requirements.html
  • 354. Things to Consider (1/3)
  • 355. Things to Consider (1/3)&#8226; Virtualization
  • 356. Things to Consider (1/3)&#8226; Virtualization &#8226; Riak’s workload is I/O bound
  • 357. Things to Consider (1/3)&#8226; Virtualization &#8226; Riak’s workload is I/O bound &#8226; Run on bare metal for best performance.
  • 358. Things to Consider (1/3)&#8226; Virtualization &#8226; Riak’s workload is I/O bound &#8226; Run on bare metal for best performance. &#8226; Virtualize for other factors (agility or cost)
  • 359. Things to Consider (1/3)&#8226; Virtualization &#8226; Riak’s workload is I/O bound &#8226; Run on bare metal for best performance. &#8226; Virtualize for other factors (agility or cost)&#8226; Object size
  • 360. Things to Consider (1/3)&#8226; Virtualization &#8226; Riak’s workload is I/O bound &#8226; Run on bare metal for best performance. &#8226; Virtualize for other factors (agility or cost)&#8226; Object size &#8226; Too small means unnecessary disk and network overhead
  • 361. Things to Consider (1/3)&#8226; Virtualization &#8226; Riak’s workload is I/O bound &#8226; Run on bare metal for best performance. &#8226; Virtualize for other factors (agility or cost)&#8226; Object size &#8226; Too small means unnecessary disk and network overhead &#8226; Too large means chunky reads and writes.
  • 362. Things to Consider (1/3)&#8226; Virtualization &#8226; Riak’s workload is I/O bound &#8226; Run on bare metal for best performance. &#8226; Virtualize for other factors (agility or cost)&#8226; Object size &#8226; Too small means unnecessary disk and network overhead &#8226; Too large means chunky reads and writes.&#8226; Read/Write Ratio
  • 363. Things to Consider (1/3)&#8226; Virtualization &#8226; Riak’s workload is I/O bound &#8226; Run on bare metal for best performance. &#8226; Virtualize for other factors (agility or cost)&#8226; Object size &#8226; Too small means unnecessary disk and network overhead &#8226; Too large means chunky reads and writes.&#8226; Read/Write Ratio &#8226; Riak is not meant for dumping many tiny datapoints.
  • 364. Things to Consider (2/3)
  • 365. Things to Consider (2/3)&#8226; “Randomness” of Reads / Writes
  • 366. Things to Consider (2/3)&#8226; “Randomness” of Reads / Writes &#8226; Recently accessed objects are cached in memory.
  • 367. Things to Consider (2/3)&#8226; “Randomness” of Reads / Writes &#8226; Recently accessed objects are cached in memory. &#8226; A small working set of objects will be fast.
  • 368. Things to Consider (2/3)&#8226; “Randomness” of Reads / Writes &#8226; Recently accessed objects are cached in memory. &#8226; A small working set of objects will be fast.&#8226; Amount of RAM
  • 369. Things to Consider (2/3)&#8226; “Randomness” of Reads / Writes &#8226; Recently accessed objects are cached in memory. &#8226; A small working set of objects will be fast.&#8226; Amount of RAM &#8226; Expands the size of cached working set, lowers latency.
  • 370. Things to Consider (2/3)&#8226; “Randomness” of Reads / &#8226; Disk Speed Writes &#8226; Recently accessed objects are cached in memory. &#8226; A small working set of objects will be fast.&#8226; Amount of RAM &#8226; Expands the size of cached working set, lowers latency.
  • 371. Things to Consider (2/3)&#8226; “Randomness” of Reads / &#8226; Disk Speed Writes &#8226; Faster disk means &#8226; Recently accessed lower read/write objects are cached in latency. memory. &#8226; A small working set of objects will be fast.&#8226; Amount of RAM &#8226; Expands the size of cached working set, lowers latency.
  • 372. Things to Consider (2/3)&#8226; “Randomness” of Reads / &#8226; Disk Speed Writes &#8226; Faster disk means &#8226; Recently accessed lower read/write objects are cached in latency. memory. &#8226; Number of Processors &#8226; A small working set of objects will be fast.&#8226; Amount of RAM &#8226; Expands the size of cached working set, lowers latency.
  • 373. Things to Consider (2/3)&#8226; “Randomness” of Reads / &#8226; Disk Speed Writes &#8226; Faster disk means &#8226; Recently accessed lower read/write objects are cached in latency. memory. &#8226; Number of Processors &#8226; A small working set of objects will be fast. &#8226; More processors == more Map/Reduce&#8226; Amount of RAM throughput. &#8226; Expands the size of cached working set, lowers latency.
  • 374. Things to Consider (2/3)&#8226; “Randomness” of Reads / &#8226; Disk Speed Writes &#8226; Faster disk means &#8226; Recently accessed lower read/write objects are cached in latency. memory. &#8226; Number of Processors &#8226; A small working set of objects will be fast. &#8226; More processors == more Map/Reduce&#8226; Amount of RAM throughput. &#8226; Expands the size of &#8226; Faster processors == cached working set, lower Map/Reduce lowers latency. latency.
  • 375. Things to Consider (3/3)
  • 376. Things to Consider (3/3)&#8226; Features
  • 377. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search
  • 378. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search&#8226; Backends
  • 379. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search&#8226; Backends &#8226; Bitcask vs. Innostore vs. eLevelDB
  • 380. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search&#8226; Backends &#8226; Bitcask vs. Innostore vs. eLevelDB &#8226; Space/Time tradeoff
  • 381. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search&#8226; Backends &#8226; Bitcask vs. Innostore vs. eLevelDB &#8226; Space/Time tradeoff&#8226; Partitions
  • 382. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search&#8226; Backends &#8226; Bitcask vs. Innostore vs. eLevelDB &#8226; Space/Time tradeoff&#8226; Partitions &#8226; Depends on eventual number of boxes.
  • 383. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search&#8226; Backends &#8226; Bitcask vs. Innostore vs. eLevelDB &#8226; Space/Time tradeoff&#8226; Partitions &#8226; Depends on eventual number of boxes.&#8226; Protocol
  • 384. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search&#8226; Backends &#8226; Bitcask vs. Innostore vs. eLevelDB &#8226; Space/Time tradeoff&#8226; Partitions &#8226; Depends on eventual number of boxes.&#8226; Protocol &#8226; HTTP vs. Protocol Buffers
  • 385. Things to Consider (3/3)&#8226; Features &#8226; RiakKV vs. Riak 2I vs. Riak Search&#8226; Backends &#8226; Bitcask vs. Innostore vs. eLevelDB &#8226; Space/Time tradeoff&#8226; Partitions &#8226; Depends on eventual number of boxes.&#8226; Protocol &#8226; HTTP vs. Protocol Buffers &#8226; All clients support HTTP, some support PB.
  • 386. Performance Tuning
  • 387. Performance Tuning&#8226; General Tips
  • 388. Performance Tuning&#8226; General Tips &#8226; Start with a “DB” Like Machine Pro&#64257;le
  • 389. Performance Tuning&#8226; General Tips &#8226; Start with a “DB” Like Machine Pro&#64257;le &#8226; Multi-core 64-bit CPUs
  • 390. Performance Tuning&#8226; General Tips &#8226; Start with a “DB” Like Machine Pro&#64257;le &#8226; Multi-core 64-bit CPUs &#8226; The More RAM the Better
  • 391. Performance Tuning&#8226; General Tips &#8226; Start with a “DB” Like Machine Pro&#64257;le &#8226; Multi-core 64-bit CPUs &#8226; The More RAM the Better &#8226; Fast Disk
  • 392. Performance Tuning&#8226; General Tips &#8226; Start with a “DB” Like Machine Pro&#64257;le &#8226; Multi-core 64-bit CPUs &#8226; The More RAM the Better &#8226; Fast Disk &#8226; Use noatime mounts
  • 393. Performance Tuning&#8226; General Tips &#8226; Start with a “DB” Like Machine Pro&#64257;le &#8226; Multi-core 64-bit CPUs &#8226; The More RAM the Better &#8226; Fast Disk &#8226; Use noatime mounts &#8226; Limit List Keys and Full Bucket MapReduce
  • 394. Performance Tuning&#8226; General Tips &#8226; Start with a “DB” Like Machine Pro&#64257;le &#8226; Multi-core 64-bit CPUs &#8226; The More RAM the Better &#8226; Fast Disk &#8226; Use noatime mounts &#8226; Limit List Keys and Full Bucket MapReduce &#8226; Benchmark in Advance
  • 395. Performance Tuning&#8226; General Tips &#8226; Start with a “DB” Like Machine Pro&#64257;le &#8226; Multi-core 64-bit CPUs &#8226; The More RAM the Better &#8226; Fast Disk &#8226; Use noatime mounts &#8226; Limit List Keys and Full Bucket MapReduce &#8226; Benchmark in Advance &#8226; Graph Everything
  • 396. Performance Tuning
  • 397. Performance Tuning&#8226; Bitcask Backend
  • 398. Performance Tuning&#8226; Bitcask Backend &#8226; KeyDir is in Memory
  • 399. Performance Tuning&#8226; Bitcask Backend &#8226; KeyDir is in Memory &#8226; Filesystem Cache (Access Pro&#64257;le Considerations)
  • 400. Performance Tuning&#8226; Bitcask Backend &#8226; KeyDir is in Memory &#8226; Filesystem Cache (Access Pro&#64257;le Considerations) &#8226; Merge Trigger Settings
  • 401. Performance Tuning&#8226; Bitcask Backend &#8226; KeyDir is in Memory &#8226; Filesystem Cache (Access Pro&#64257;le Considerations) &#8226; Merge Trigger Settings &#8226; Scheduling Bitcask Merges
  • 402. Performance Tuning&#8226; Bitcask Backend &#8226; KeyDir is in Memory &#8226; Filesystem Cache (Access Pro&#64257;le Considerations) &#8226; Merge Trigger Settings &#8226; Scheduling Bitcask Merges &#8226; Key Expiration
  • 403. Performance Tuning&#8226; Bitcask Backend &#8226; KeyDir is in Memory &#8226; Filesystem Cache (Access Pro&#64257;le Considerations) &#8226; Merge Trigger Settings &#8226; Scheduling Bitcask Merges &#8226; Key Expiration&#8226; Documentation
  • 404. Performance Tuning&#8226; Bitcask Backend &#8226; KeyDir is in Memory &#8226; Filesystem Cache (Access Pro&#64257;le Considerations) &#8226; Merge Trigger Settings &#8226; Scheduling Bitcask Merges &#8226; Key Expiration&#8226; Documentation &#8226; http://wiki.basho.com/Bitcask.html
  • 405. Performance Tuning&#8226; Bitcask Backend &#8226; KeyDir is in Memory &#8226; Filesystem Cache (Access Pro&#64257;le Considerations) &#8226; Merge Trigger Settings &#8226; Scheduling Bitcask Merges &#8226; Key Expiration&#8226; Documentation &#8226; http://wiki.basho.com/Bitcask.html &#8226; http://wiki.basho.com/Bitcask-Capacity-Planning.html
  • 406. Performance Tuning
  • 407. Performance Tuning&#8226; Innostore Backend
  • 408. Performance Tuning&#8226; Innostore Backend &#8226; Similar to MySQL + InnoDB
  • 409. Performance Tuning&#8226; Innostore Backend &#8226; Similar to MySQL + InnoDB &#8226; buffer pool size
  • 410. Performance Tuning&#8226; Innostore Backend &#8226; Similar to MySQL + InnoDB &#8226; buffer pool size &#8226; o_direct
  • 411. Performance Tuning&#8226; Innostore Backend &#8226; Similar to MySQL + InnoDB &#8226; buffer pool size &#8226; o_direct &#8226; log_&#64257;les_in_groups
  • 412. Performance Tuning&#8226; Innostore Backend &#8226; Similar to MySQL + InnoDB &#8226; buffer pool size &#8226; o_direct &#8226; log_&#64257;les_in_groups &#8226; Separate Spindles for Log and Data
  • 413. Performance Tuning&#8226; Innostore Backend &#8226; Similar to MySQL + InnoDB &#8226; buffer pool size &#8226; o_direct &#8226; log_&#64257;les_in_groups &#8226; Separate Spindles for Log and Data&#8226; Documentation
  • 414. Performance Tuning&#8226; Innostore Backend &#8226; Similar to MySQL + InnoDB &#8226; buffer pool size &#8226; o_direct &#8226; log_&#64257;les_in_groups &#8226; Separate Spindles for Log and Data&#8226; Documentation &#8226; http://wiki.basho.com/Setting-Up-Innostore.html
  • 415. Performance Tuning&#8226; Innostore Backend &#8226; Similar to MySQL + InnoDB &#8226; buffer pool size &#8226; o_direct &#8226; log_&#64257;les_in_groups &#8226; Separate Spindles for Log and Data&#8226; Documentation &#8226; http://wiki.basho.com/Setting-Up-Innostore.html &#8226; http://wiki.basho.com/Innostore-Con&#64257;guration-and- Tuning.html
  • 416. basho_bench
  • 417. basho_bench&#8226; What Does It Do?
  • 418. basho_bench&#8226; What Does It Do? &#8226; Generates load against a Riak cluster. Logs and graphs results.
  • 419. basho_bench&#8226; What Does It Do? &#8226; Generates load against a Riak cluster. Logs and graphs results. &#8226; Intended for cluster capacity planning.
  • 420. basho_bench&#8226; What Does It Do? &#8226; Generates load against a Riak cluster. Logs and graphs results. &#8226; Intended for cluster capacity planning.&#8226; Major Parameters
  • 421. basho_bench&#8226; What Does It Do? &#8226; Generates load against a Riak cluster. Logs and graphs results. &#8226; Intended for cluster capacity planning.&#8226; Major Parameters &#8226; Test Harness / Key Generator / Value Generator
  • 422. basho_bench&#8226; What Does It Do? &#8226; Generates load against a Riak cluster. Logs and graphs results. &#8226; Intended for cluster capacity planning.&#8226; Major Parameters &#8226; Test Harness / Key Generator / Value Generator &#8226; Read / write / update mix.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2015-9-14 13:50:15 | 显示全部楼层
安全库半导体世界IT采购网半导体联盟
晕,看着就很复杂。。。。。。。
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2016-5-17 13:56:18 | 显示全部楼层
学习学习
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2016-5-18 16:37:55 | 显示全部楼层
学习存储,感谢楼主
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2016-7-1 23:21:57 | 显示全部楼层
不错的存储资料啊,下了谢谢
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2016-7-31 05:10:18 | 显示全部楼层
支持,ddddd
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2016-9-21 03:41:11 | 显示全部楼层
感谢楼主分享
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2016-11-2 08:10:51 | 显示全部楼层
好资料一起看,谢谢。。。。
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2016-12-17 06:15:27 | 显示全部楼层
好人。。。。
文明发言,共建绿色平台。
回复

使用道具 举报

发表于 2016-12-28 22:27:08 | 显示全部楼层
看看了,多发些资料了,谢谢
文明发言,共建绿色平台。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|返回首页|中国存储论坛

GMT+8, 2024-4-24 11:23

Powered by Discuz

© 2001-2018 中国存储网Chinastor

快速回复 返回顶部 返回列表