Aerospike是一个以分布式为核心,T级别大数据高并发的结构化数据存储解决方案,读写操作达微妙级,索引内存化数据固态化,自动感知集群状态,节点间数据强一致性,平滑扩展以及丰富的开发语言支持,和redis相比aql介入的更有亲和力,对RDBMS的支持更好,熟悉sql的小哥哥小姐姐表示毫无压力,不过稳定性和普及率还有相当的差距,据说许多互联网广告相关业务都用它存储中间数据,难道我这些年混的都是假的互联网广告公司吗,有用的请举个爪儿。
| Aerospike | MySQL |
|---|
| namespace | db |
| set | table |
| bin | column |
| key | primary key |
| record | row |
下载地址:https://www.aerospike.com/artifacts/aerospike-server-community/,解压执行asinstall,service aerospike [start|stop|status]管理服务,/etc/aerospike/aerospike.conf服务端配置文件中network块中heartbeat部分配置了集群的组播地址与端口,namespace块定义自己的业务命名空间;/etc/aerospike/astools.conf为aql端配置文件,其中aql块中timeout项被屏蔽默认1000毫秒,实操经验显示太短,建议改为2000以上;
[root@localhost ~]# tar xvf aerospike-server-community-4.2.0.5-el7.tgz
aerospike-server-community-4.2.0.5-el7/
aerospike-server-community-4.2.0.5-el7/SHA256SUMS
aerospike-server-community-4.2.0.5-el7/aerospike-tools-3.15.3.8-1.el7.x86_64.rpm
aerospike-server-community-4.2.0.5-el7/LICENSE
aerospike-server-community-4.2.0.5-el7/asinstall
aerospike-server-community-4.2.0.5-el7/aerospike-server-community-4.2.0.5-1.el7.x86_64.rpm
[root@localhost ~]# cd aerospike-server-community-4.2.0.5-el7/
[root@localhost aerospike-server-community-4.2.0.5-el7]# ./asinstall
rpm -Uvh aerospike-tools-3.15.3.8-1.el7.x86_64.rpm
准备中... ################################# [100%]
软件包 aerospike-tools-3.15.3.8-1.el7.x86_64 已经安装
rpm -Uvh aerospike-server-community-4.2.0.5-1.el7.x86_64.rpm
准备中... ################################# [100%]
软件包 aerospike-server-community-4.2.0.5-1.el7.x86_64 已经安装
[root@localhost aerospike-server-community-4.2.0.5-el7]# service aerospike start
/bin/mountpoint: /usr/local/lib/libuuid.so.1: no version information available (required by /lib64/libblkid.so.1)
/bin/mountpoint: /usr/local/lib/libuuid.so.1: no version information available (required by /lib64/libblkid.so.1)
Redirecting to /bin/systemctl start aerospike.service
[root@localhost aerospike-server-community-4.2.0.5-el7]# service aerospike status
/bin/mountpoint: /usr/local/lib/libuuid.so.1: no version information available (required by /lib64/libblkid.so.1)
/bin/mountpoint: /usr/local/lib/libuuid.so.1: no version information available (required by /lib64/libblkid.so.1)
Redirecting to /bin/systemctl status aerospike.service
● aerospike.service - Aerospike Server
Loaded: loaded (/usr/lib/systemd/system/aerospike.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/aerospike.service.d
Active: active (running) since 一 2018-07-23 16:25:21 CST; 17s ago
Process: 7452 ExecStartPre=/bin/systemctl start aerospike_telemetry (code=exited, status=0/SUCCESS)
Process: 7444 ExecStartPre=/usr/bin/asd-systemd-helper (code=exited, status=0/SUCCESS)
CGroup: /system.slice/aerospike.service
└─7455 /usr/bin/asd --config-file /etc/aerospike/aerospike.conf --fgdaemon
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:291) in-progress: tsvc-q 0 info-q 0 nsup-delete-q 0 rw-hash 0 proxy-hash 0 tree-gc-q 0
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:313) fds: proto (0,3,3) heartbeat (0,0,0) fabric (0,0,0)
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:322) heartbeat-received: self 67 foreign 0
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:353) fabric-bytes-per-second: bulk (0,0) ctrl (0,0) meta (0,0) rw (0,0)
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:408) {test} objects: all 0 master 0 prole 0 non-replica 0
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:469) {test} migrations: complete
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:488) {
test} memory-usage: total-bytes 0 index-bytes 0 sindex-bytes 0>
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:408) {3gu} objects: all 0 master 0 prole 0 non-replica 0
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:469) {3gu} migrations: complete
7月 23 16:25:31 localhost.localdomain asd[7455]: Jul 23 2018 08:25:31 GMT: INFO (info): (ticker.c:488) {3gu} memory-usage: total-bytes 0 index-bytes 0 sindex-bytes 0>
[root@localhost aerospike-server-community-4.2.0.5-el7]# aql
Config File: /etc/aerospike/astools.conf /root/.aerospike/astools.conf
Copyright 2012-2017 Aerospike. All rights reserved.
[127.0.0.1:3000] 2 rows in set (0.003 secs)
LUA_USERPATH = /opt/aerospike/usr/udf/lua
LUA_SYSPATH = /opt/aerospike/sys/udf/lua
RECORD_PRINT_METADATA = false
FAIL_ON_CLUSTER_CHANGE = true
aql> insert into myns(pk,id,name,host,port,info) values('key1','001','AAA','192.168.0.1','10001','设备一')
+-------+-------+---------------+---------+-------------+
| id | name | host | port | info |
+-------+-------+---------------+---------+-------------+
| "001" | "AAA" | "192.168.0.1" | "10001" | "设备一" |
+-------+-------+---------------+---------+-------------+
1 row in set (1.311 secs)
aql> delete from myns where pk='key1'
0 rows in set (1.269 secs)


Aerospike从安装到启动到操作上面都逐一演示了一遍,下一篇文章打算选择一个开发语言来实现远程连接和执行上述操作,为使用Aerospike的研发小伙伴抛砖引玉。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26692020/viewspace-3170354/
,如需转载,请注明出处,否则将追究法律责任。