やりたかなかろうAerospikeバージョンアップした話
あまりやりたかないAerospikeのバージョン上げた話
かれこれAerospike検証時期を含めると2013年11月から使ってるのでもうすぐ丸2年になります。
日本の導入企業では長いほうなんじゃないかな
ただ、普段ほとんど触りませんが(~o~)
構成
マスタークラスタ5台、スレーブクラスタ5台でXDRを使ってクラスタ間で同期しています。
クラスタ単位の容量は、メモリ 1TBくらい、SSD 15TBくらい
育ちました
あ、Aerospikeは"SSD & MEM"モードですのでフルでリソース使えないです。HighWaterMarkとかいろいろ事情がありまして。
バージョンは3.3.8
バージョンアップ
v3.3.8 => v3.6.3 (2015/10/28時点最新)
追加された設定値を精査すると結構あるな・・
Configuration Reference | Reference Manual | Aerospike
追加が26個
非推奨が17個
気になったパラメータとか
①. transaction-repeatable-read (非推奨)
これは使ってたのですが非推奨になりました。
Consistency Level的な設定で、Trueだと全てのレプリカを読んで最新を返しますが、Falseにするとマスタとなるデータを読んでそれを返します(他のレプリ側が新しいデータである可能性もあるんで、データ一貫性取るか速度取るかという感じです)。
②. read-consistency-level-override (v3.3.26から)
①のtransaction-repeatable-readの代わりとなるパラメータです。off,one,allがあります。それぞれ
off: client policy read.replicaを優先する。上書かない one: マスタから取得する all: 全てのレプリカノードから、最新(最大のgeneration)を取得する
consistencyについてはこの辺に書かれてます
Per-Transaction Consistency Guarantees | Clients | Aerospike
③. set-delete (v3.6.1から)
setが消せるようになったようです。以前は消せなかったってのがそもそもアレですが;
④. allow-nonxdr-writes、allow-nxdr-writes (3.5.12から)
こちらはまだ試せていませんが、両方ともfalseにすることでxdr以外による書き込みを禁止、xdrによる書き込みを禁止できるそうです。
今まではノードをクラスタインすると同時にReadもWriteも始まってしまうので、このオプションで一息付けるかもしれません。
なにより仕様によるXDRの転送漏れをこれで防げるかも!?
XDRはasdにある書き込みを転送します。過去分は送れません。xdrの起動プロセス上asdのプロセスがいることを一定間隔で確認してから起動します。なのでその一定間隔の間にasdにあった書き込みを送れないという事案
xdrプロセスの停止起動が発生する場合、事前にallow-nonxdr-writesをfalseにしておくことで書き込み制御します。これにより書き込みを止めた状態でxdrを起動出来、転送漏れがなくなるかもです
⑤. mesh-address,mesh-port (非推奨)
mesh-seed-address-portで設定するようです。AWSでAerospikeしてる人はマルチキャストがあれなんで使ってるはずですね。
⑥. enable-osync (3.3.21から)
RAWデバイスへのフラッシュ時のデバイスを指定できるとあるのですが、指定する分オーバーヘッドありそうだし、指定することのメリットがちょっとわからない。さらにどう確認するんだろ。ベンチかけるしかないのか
アプデ
もちろんスレーブクラスタ側。こういう時スレーブがあるって素敵☆
プロセス止めて、アップデートしてコンフィグをごちょごちょして、起動し直して
台数分実施です。当時とインストール方法が変わってたのでAnsibleのPlaybook書き直しました。
最大のネックはマイグレーションを待つ時間が15時間以上かかってたことですね。マイグレーション用のスレッドを5に上げて気長にやりました><
バックアップオプション
バックアップオプションの-bがなくなってて定期バックアップジョブがこけてた(・ω・)
デフォルトがbase64 encoded stringになった模様
asadmというコマンド
管理ツールが複数あったのですがasadmに統一していく感じでしょうか、どんどん見やすくなってもらいたいです
[root@aeroserver1 ~]# asadm Aerospike Interactive Shell, version 0.0.13 Found 5 nodes Online: xxxxxx:3000, yyyyyyy:3000, zzzzzzz:3000,aaaaaa:3000, bbbbbb:3000 Admin> help Aerospike Admin - !: "shell" is used to run shell commands on the local node. - asinfo: "asinfo" provides raw access to the info protocol. Options: -v <command> - The command to execute -p <port> - The port to use. NOTE: currently restricted to 3000 or 3004 -l - Replace semicolons ";" with newlines. Modifiers: like, with Default: Executes an info command. - clinfo: "asinfo" provides raw access to the info protocol. Options: -v <command> - The command to execute -p <port> - The port to use. NOTE: currently restricted to 3000 or 3004 -l - Replace semicolons ";" with newlines. Modifiers: like, with Default: Executes an info command. - cluster: Modifiers: with - dun: - undun: - collectinfo: "collectinfo" is used to collect system stats on the local node. - exit: Terminate session - help: Returns documentation related to a command for example, to retrieve documentation for the "info" command use "help info". - info: The "info" command provides summary tables for various aspects of Aerospike functionality. Modifiers: with Default: Displays service, network, namespace, and xdr summary information. - namespace: Displays summary information for each namespace. - network: Displays network information for Aerospike, the main purpose of this information is to link node ids to fqdn/ip addresses. - service: Displays summary information for the Aerospike service. - sindex: Displays summary information for Seconday Indexes (SIndex). - xdr: Displays summary information for Cross Datacenter Replication (XDR). - shell: "shell" is used to run shell commands on the local node. - show: "show" is used to display Aerospike Statistics and configuration. - config: "show config" is used to display Aerospike configuration settings Modifiers: diff, like, with Default: Displays service, network, namespace, and xdr configuration - namespace: Displays namespace configuration - network: Displays network configuration - service: Displays service configuration - xdr: Displays XDR configuration - distribution: "distribution" is used to show the distribution of object sizes and time to live for node and a namespace. Modifiers: like, with Default: Shows the distributions of Time to Live and Object Size - eviction: Shows the distribution of Eviction TTLs for namespaces - object_size: Shows the distribution of Object sizes for namespaces - time_to_live: Shows the distribution of TTLs for namespaces - latency: Modifiers: like, with Default: Displays latency information for Aerospike cluster. - statistics: Displays statistics for Aerospike components. Modifiers: like, with Default: Displays bin, set, service, namespace, and xdr statistics - bins: Displays bin statistics - namespace: Displays namespace statistics - service: Displays service statistics - sets: Displays set statistics - xdr: Displays xdr statistics - watch: "watch" Runs a command for a specified pause and iterations. Usage: watch [pause] [iterations] [--no-diff] command] pause: the duration between executions. [default: 2 seconds] iterations: Number of iterations to execute command. [default: until keyboard interrupt] --no-diff: Do not do diff highlighting Example 1: Show "info network" 3 times with 1 second pause watch 1 3 info network Example 2: Show "info namespace" with 5 second pause until interrupted watch 5 info namespace
[root@aeroserver1 ~]# asadm -e "show distribution" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~fox - TTL Distribution in Seconds~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Percentage of records having ttl less than or equal to value measured in Seconds Node 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% aeroserver1 272151 574541 846692 1149082 1481711 1814340 2146969 2449359 2751749 3023900 aeroserver2 272160 574560 846720 1149120 1481760 1814400 2147040 2449440 2751840 3024000 aeroserver3 272160 574560 846720 1149120 1481760 1814400 2147040 2449440 2751840 3024000 aeroserver4 272151 574541 846692 1149082 1481711 1814340 2146969 2449359 2751749 3023900 aeroserver5 272151 574541 846692 1149082 1481711 1814340 2146969 2449359 2751749 3023900 Number of rows: 5 ~~~~~~~~~~~~fox - Object Size Distribution in Record Blocks~~~~~~~~~~~~~ Percentage of records having objsz less than or equal to value measured in Record Blocks Node 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% aeroserver1 3 3 4 4 6 6 6 6 9 100 aeroserver2 3 3 4 4 6 6 6 6 9 100 aeroserver3 3 3 4 4 6 6 6 6 9 100 aeroserver4 3 3 4 4 6 6 6 6 9 100 aeroserver5 3 3 4 4 6 6 6 6 9 100 Number of rows: 5
2つめのクラスタ構築
そういや絶賛構築中です( ^o^)ノ
ではさいなら~