4. 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
}
}
5. 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.
6. 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 "info@aerospike.com"
succeeded: key = Aerospike set= bin= email value= info@aerospike.com
$ cli -h 127.0.0.1 -n test -o get -k Aerospike
{'email': 'info@aerospike.com', 'name': 'Aerospike, Inc.', 'address': 'Mountain View, CA
94043'}