2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Cluster Capacity Planning

Last updated at Posted at 2013-06-25

大雑把な意訳、ってか、ほとんど省略してるけど・・
http://docs.basho.com/riak/1.3.0/references/appendices/Cluster-Capacity-Planning/

Overview

Riak Cluster を運用する際に考慮されるべき様々な項目のアウトラインです。

This is a short document that outlines the various elements and variables that should be considered when planning your Riak cluster. Your use case and environment variables will obviously be specific to what you're building, but this document should set you on the right path to planning and launching the suitable Riak cluster.

RAM

RAM は最も重要なリソースとして考えるべきです。複雑な MapReduce クエリーを実行するにはメモリーが必要でしょう。また、メモリーによるデータのキャッシュは、低いレイテンシーを実現します。

RAM should be viewed as the most important resource when sizing your Riak cluster. Aside from helping you keep more data closer to your users, memory will also be required when running complex MapReduce queries, and caching data to provide low latency request times.

Bitcask and Memory Requirements

Bitcask は使わない予定なので、省略します。

LevelDB

Bitsack のために RAM を必須条件にしたくなければ、LevelDB の使用を推奨します。LevelDB は処理に大量のメモリーを要求しませんが、利用可能なメモリーを多く与えることでパフォーマンスは増加するでしょう。

If RAM requirements for Bitcask are prohibitive, Basho recommends use of the LevelDB backend. While LevelDB doesn't require a large amount of RAM to operate, supplying it with the maximum amount of memory available will lead to higher performance. For more information see LevelDB.

Disk

そんなに重要ではないので、省略します。

Read/Write Profile

Read/Write の割合や、読み込まれる Key の分散によって、Riak Cluster の構成および設定は異なります。Write が非常に多い場合は、キャッシュに使用する RAM は少なくてよいです。さらに、もし一部の Key のみが定期的に読み込まれる場合は、それらの Key の値をキャッシュする為に多くの RAM は必要となりません。

Read/write ratios, as well as the the distribution of key access, should influence the configuration and design of your cluster. If your use case is write heavy you will need less RAM for caching, in addition if only a certain portion of keys is accessed regularly, such as a pareto distribution, you won't need as much RAM available to cache those keys' values.

Number of Nodes

Riak Cluster のノード台数 (物理サーバ数) は、データのレプリケーション数に依存します。Riak Cluster が常に read/write できることを保証する為に、レプリケーション数は初期設定の N=3 を推奨します。そのためには 3 台あるいは 4 台のノードで Riak を構築する必要があります。しかし、本番環境においては fault tolerance を活かす為に、少なくても 5 台のノードを使用する事を推奨します。5 台より少ない Riak Cluster は、ほとんどのノード (75-100%) が各リクエストを処理する必要があるため、一部のノードの負荷が高騰することでパフォーマンス劣化を引き起こします。

The number of nodes (i.e. physical servers) in your Riak Cluster depends on the number of times data is Replicated across the cluster.
To ensure that the cluster is always available to respond to read and write requests, Basho recommends a “sane default” of N=3 replicas. This requirement can be met with a three or four node cluster (as implemented in The Riak Fast Track). However, for production deployments we recommend using no fewer than 5 nodes, as node failures in smaller clusters can compromise the fault-tolerance of the system. Additionally, in clusters smaller than 5 nodes, a high percentage of the nodes (75-100% of them) will need to respond to each request, putting undue load on the cluster that may degrade performance. For more details on this recommendation, see this blog post.

Ring Size/Number of Partitions

Ring サイズは、Riak Cluster を構築するパーティション数です。この値は Riak Cluster を起動する前に app.config ファイルの ring_creation_size パラメータを設定します。

Ring size is the number of partitions that make up your Riak Cluster. This is a number that is configured before you cluster is started, and is set in your app.config file under the ring_creation_size parameter.

Riak Cluster を構築数パーティション数の初期値は 64 です。これは小さな Riak Cluster 向けの為、もし 5 ノードより増やす予定がある場合は、より大きな Ring サイズを考慮してください。Ring サイズは 2 の累乗である必要があり、1 ノードあたりのパーティションの最小数は 10 を推奨します。また、ノード数でパーティション数を割ることで、1 ノードあたりのパーティション数を計算できます。Ring サイズによってスケールアウトできる上限が決まる為、成長を考慮に入れることは非常に重要です。

The default number of partitions in a Riak cluster is 64. This works for smaller clusters, but if you plan to grow your cluster past 5 nodes it is recommended you consider a larger ring size. Ring sizes must be a power of 2. The minimum number of partitions recommended per node is 10, and you can determine the number of partitions that will be allocated per node by dividing the number of partitions by the number of nodes. At the moment, the ring size you choose will be the same for the life of the cluster, so taking growth into consideration is extremely important.

Riak Cluster (8-16 ノード) においてパーティション数を 128, 256, 512 に設定することは、Riak Cluster をスケールアウトできる優れたオプションです。もし適切なパーティション数が分からない場合は、Riak の ML に投稿してください。

For most moderate-sized Riak clusters (8-16 nodes) 128, 256, and 512 partitions are excellent options that will allow you to incrementally grow (or shrink) your cluster. If you're unsure about the best number of partitions to use, consult the Riak Mailing List for some suggestions.

Other Factors

構築した環境が、ネットワークパーティションの補正によってシステムのロードが増加するかもしれません。仮想環境で動作させると、I/O レイテンシにより急激にパフォーマンスを劣化させるかもしれません。本番運用を行なう前に、長期間の負荷試験を行い、構築した環境での振る舞いを十分に理解する必要があります。Riak Cluster のパフォーマンスをベンチマークする Basho Bench を使用することを推奨します。

Riak is built to run in a clustered environment and while it will compensate for network partitions they cause increased load on the system. In addition, running in a virtualized environment that lacks low latency IO access can drastically decrease performance. Before putting your Riak cluster in production is recommended you gain a full understanding of your environment's behavior so you know how your cluster performs under load for an extended period of time. Doing so will help you size your cluster for future growth and lead to optimal performance. Basho recommends using Basho Bench for benchmarking the performance of your cluster.

Bandwidth

Riak はディストリビューションに構築された Erlang を使用して、データへの信頼できるアクセスを提供します。Riak Cluster は様々なネットワークトポロジーで構築できますが、ノード間の遅延をほとんど無い環境が推奨されます。複数のデータセンター間で Riak Cluster を構築することは推奨しません。もし複数のデータセンター間で Riak Clutser を構築したい場合は、Riak Enterprise を検討してください。

Riak uses Erlang's built in distribution capabilities to provide reliable access to data. A Riak cluster can be deployed in many different network topologies, but it is recommended to have as little latency between nodes as possible. High latency leads to sub-optimal performance. It is not recommended to deploy a single Riak cluster across two data centers. If you need this capability Basho offers an inter-datacenter replication option that is built to keep multiple Riak clusters in sync across several geographically diverse deployments.

IO

一般的に Riak の最も大きいボトルネックになる箇所は IO です。Riak は複数の物理ノードに分散してデータを格納するので、RAID による冗長構成を捨てることを考慮できます。低い遅延のために RAID0 や SSD の使用を検討してください。

In general the biggest bottleneck for Riak will be the amount of IO available to it, especially in the case of write-heavy work loads. Riak functions much like any other database and the design of your disk access should take this into account. Because Riak is clustered and your data is stored on multiple physical nodes, you can consider forgoing a tradition RAID setup for redundancy and focus on providing the least latency possible using SATA Drives or SSDs, for example.

End

最後てきとーになっちゃったけど、おしまい

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?