aerospike紹介-lt用

12
Joongjin Bae twitter: bae_j http://baepiff.blogspot.com/

Upload: joongjin-bae

Post on 15-Jan-2015

1.672 views

Category:

Technology


9 download

DESCRIPTION

NoSQLの一つAerospikeの紹介。チーム内向けのLT資料なので適当です。><

TRANSCRIPT

Page 1: Aerospike紹介-LT用

Joongjin Bae

twitter: bae_j

http://baepiff.blogspot.com/

Page 2: Aerospike紹介-LT用

彼らは宣伝してる!

• Cassandraより10倍速い!CouchBaseも速い! http://www.thumbtack.net/solutions/documents/Ultra-HighPerformanceNoSQLBenchmarking.pdf

• Low latency:99% under 1ms & 99.9% under 5ms - 120 bytesのrecordに対して

• 一ノード200K TPSと書込み 50K TPS

• クラスタ構成も簡単! 起動すると勝手に追加される。 ダウンしたら外れる 再起動するとクラスタへ再度合流

Page 3: Aerospike紹介-LT用

Install & 設定

• Install

Linuxしか対応してないCentOSとUbuntuのみ 詳細はwebで http://baepiff.blogspot.jp/2013/04/install-and-run-aerospike-community.html

• 設定 ノード間Heartbeat設定は http://baepiff.blogspot.jp/2013/04/how-to-add-new-node-to-aerospike.html

Page 4: Aerospike紹介-LT用

Namespaceとストレージ設定

namespace test { replication-factor 2 # keep two copies of every data item # in this namespace high-water-memory-pct 60 # evict data if memory utilization is # greater than 60% high-water-disk-pct 50 # evict data if disk utilization is # greater than 50% stop-writes-pct 70 # disallow writes (except deletes) # when either RAM or disk is 70% full memory-size 30064771072 # 28G - use max 28G of memory for # this namespace default-ttl 864000 # lifetime is 10 days, can be # overridden via api, 0 means lives # forever storage-engine device { device /dev/sdb # raw device data-in-memory true # keep a copy of all data in memory # always defrag-period 120 # run defrag every 120 seconds defrag-lwm-pct 50 # reclaim blocks that are less than 50% # full defrag-max-blocks 4000 # defragment at most 4000 disk blocks # in each run defrag-startup-minimum 10 # server needs at least 10% free space # at startup } }

Page 5: Aerospike紹介-LT用

Architecture

1.The cluster-aware Client Layer includes open source client libraries that implement Aerospike APIs, track nodes and know where data reside in the cluster.

2.The self-managing Distribution Layer oversees cluster communications and automates fail-over, replication, cross data center synchronization and intelligent re-balancing and data migration.

3.The flash-optimized Data Storage Layer reliably stores data in DRAM and Flash.

Page 6: Aerospike紹介-LT用

Data Structure

• スキマーがない

• Namespace = database

• Set = Table

• Record = row

• Bin = column

$ cli -h 127.0.0.1 -n test -o set -k Aerospike -b name -v "Aerospike, Inc." succeeded: key = Aerospike set= bin= name value= Aerospike, Inc. $ cli -h 127.0.0.1 -n test -o set -k Aerospike -b address -v "Mountain View, CA 94043" succeeded: key = Aerospike set= bin= address value= Mountain View, CA 94043 $ cli -h 127.0.0.1 -n test -o set -k Aerospike -b email -v "[email protected]" succeeded: key = Aerospike set= bin= email value= [email protected] $ cli -h 127.0.0.1 -n test -o get -k Aerospike {'email': '[email protected]', 'name': 'Aerospike, Inc.', 'address': 'Mountain View, CA 94043'}

Page 7: Aerospike紹介-LT用

Benchmark Openstack

• Server: 2core, 2GB RAMインスタンス 3

• Client: 2core, 2GB RAMインスタンス 1

• Benchmark Tool: YCSB

• Result: 1KB size 100,000 records Read 95%, Update 5% TPS – 18268, 99% latency 1ms, Min latency 210us, Max latency 1142us

Page 8: Aerospike紹介-LT用

Benchmark AWS

• Server: 2 High I/O instances on AWS(hi1.4xlarge)

• Client: 1 High CPU instance on AWS(c1.xlarge)

• Benchmark Tool: YCSB

• Condition: 40万件データ登録し 100万件(95% Read, 5% Update)

Page 9: Aerospike紹介-LT用

Benchmark AWS Result

Data Size Run time(ms) TPS

64KB 141342.0 7075

256KB(64KB x 4) 598387.0 1671

256KB 716637.0 1395

512KB(64KB x 8) 911872.0 1096

Page 10: Aerospike紹介-LT用

問題 or 宿題

• Multicastが使えるのにHeartbeatが失敗 提供されたツールで確認したにも関わらずしばらく放置すると各ノードが切り離れる。 ネットワークの問題

• 本気で負荷かけたら同時に停止してしまう。 メモリ1GBでHWMも90%に設定したのが原因かも知らないが、3台同時にプロセスが停止してしまった。 使い方が間違った。HWMは50%が推奨

• AWSのHigh I/O Instanceで試したい。 検証結果追加しました。

Page 11: Aerospike紹介-LT用

追加情報

• AerospikeはOSSではない! 中身知らない!><;;;

• 去年AlchemyDBを買収 AlchemyDBはソースコードが公開されている。 https://github.com/JakSprats/Alchemy-Database

ACIDを満足するNoSQLを目指していると予測

Page 12: Aerospike紹介-LT用

Question?