Aerospike Database is a flash memory and in-memory open source distributed key value NoSQL database management system, marketed by the company also named Aerospike
The Real-time Data Platform The multi-model, NoSQL real-time data platform for multi-cloud, large-scale JSON and SQL use cases. The Aerospike database has the lowest latency with predictable performance at any scale, with industry-leading uptime, requiring up to 80% less infrastructure.
Go to Official Aerospike Website to read more.
Follow this link to install aerospike tools on ubuntu.
There are multiple steps to install aerospike on linux :
-
Run below command to download aerospike into linux
wget -O aerospike.tgz https://download.aerospike.com/artifacts/aerospike-server-community/6.0.0.5/aerospike-server-community-6.0.0.5-ubuntu18.04.tgz --no-check-certificate
-
unzip tgz file , run below command
tar -xvf aerospike.tgz
-
Go to the aerospike folder , run below command
cd aerospike-server-community-6.0.0.5-ubuntu18.04/
-
Run below command to install aerospike by running below command
sudo ./asinstall
-
Configure Aerospike conf file , go the below mentioned path and edit aerospike.conf
vi /etc/aerospike/aerospike.conf
-
vi aerospike.conf
#Aerospike database configuration file for use with systemd.
service {
paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
proto-fd-max 15000
}
logging {
# Log file must be an absolute path.
file /opt/logs/aerospike.log {
context any info
}
# Send log messages to stdout
console {
context any info
}
}
#
#
network {
service {
address any
port 3000
}
heartbeat {
mode mesh
address Ip_address_of_server
port 3002
#mesh-seed-address-port 127.0.0.1 3002 # IP address for seed node in the cluster
#mesh-seed-address-port 127.0.0.1 3002 # IP address for seed node in the cluster
#mesh-seed-address-port 127.0.0.1 3002 # IP address for seed node in the cluster
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
namespace test_users{
replication-factor 2
memory-size 4G
storage-engine device {
file /opt/aerospike/data/user.dat
filesize 20G
data-in-memory false
}
}
-
Create log folder for aerospike logs
/opt/
-
Aerospike service commands to start, stop or check status of the aerospike service
service aerospike start // to start the aerospike service or sudo systemctl start aerospike service aerospike stop // to stop the aerospike service or sudo systemctl stop aerospike service aerospike status // to check status of the aerospike service or sudo systemctl status aerospike
Step 1 : You have to install setup of Docker Desktop on mac and run Docker Desktop.
Step 2 : Deploying Aerospike clusters with Docker :
follow this link to download the aerospike : https://www.docker.com/products/docker-desktop/
Step 3 : We will be running Aerospike Community Version of container on Mac :
Run below command to install docker image :
docker pull aerospike/aerospike-server
https://docs.aerospike.com/tools/deploy_guides/docker/tools
Run below command to run the container of aerospike on detach mode :
docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server
Follow this link to have better understanding Docker Image
docker run -t aerospike/aerospike-server aql -h $(docker inspect -f '{{.NetworkSettings.IPAddress }}' aerospike)
Aerospike uses a single file to configure a database node. The default location of the configuration file is
/etc/aerospike/aerospike.conf
Goto Aerospike Documentation for detailed information of Aerospike Configuration
# Aerospike database configuration file for use with systemd.
service {
paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
proto-fd-max 15000
}
logging {
# Log file must be an absolute path.
file /opt/logs/aerospike.log {
context any info
}
# Send log messages to stdout
console {
context any info
}
}
#
#
network {
service {
address any
port 3000
}
heartbeat {
mode mesh
address 127.0.0.1
port 3002
mesh-seed-address-port 127.0.0.1 3002 # IP address for seed node in the cluster
mesh-seed-address-port 127.0.0.1 3002 # IP address for seed node in the cluster
mesh-seed-address-port 127.0.0.1 3002 # IP address for seed node in the cluster
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
namespace test_users{
replication-factor 2
memory-size 4G
storage-engine device {
file /opt/aerospike/data/user.dat
filesize 20G
data-in-memory false
}
}
run below commands to run aql query :
aql //run aql to get inside into aerospike echosystem