/aerospike/content.md

https://gitlab.com/apachipa/docs · Markdown · 80 lines · 47 code · 33 blank · 0 comment · 0 complexity · 0d0da9c5283fc23e8604e957e727164e MD5 · raw file

  1. # Aerospike
  2. Aerospike is an open source distributed database. Aerospike is built on a "shared nothing" architecture designed to reliably store terabytes of data with automatic fail-over, replication and cross data-center synchronization.
  3. %%LOGO%%
  4. Documentation for Aerospike is available at [http://aerospike.com/docs](https://www.aerospike.com/docs).
  5. # Using this Image
  6. The following will run `asd` with all the exposed ports forwarded to the host machine.
  7. ```console
  8. $ docker run -d --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server
  9. ```
  10. **NOTE** Although this is the simplest method to getting Aerospike up and running, but it is not the preferred method. To properly run the container, please specify a **custom configuration** with the **access-address** defined.
  11. ## Custom Aerospike Configuration
  12. By default, `asd` will use the configuration file at `/etc/aerospike/aerospike.conf`, which is added to the directory by the Dockerfile. To provide a custom configuration, you should first mount a directory containing the custom aerospike.conf file using the `-v` option for `docker`:
  13. -v <DIRECTORY>:/opt/aerospike/etc
  14. Where `<DIRECTORY>` is the path to a directory containing your custom aerospike.conf file. Next, you will want to tell `asd` to use the configuration file that was just mounted by using the `--config-file` option for `aerospike/aerospike-server`:
  15. --config-file /opt/aerospike/etc/aerospike.conf
  16. This will tell `asd` to use the config file at `/opt/aerospike/etc/aerospike.conf`, which is mapped from `<DIRECTORY>/aerospike.conf`.
  17. A full example:
  18. ```console
  19. $ docker run -d -v <DIRECTORY>:/opt/aerospike/etc --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server asd --foreground --config-file /opt/aerospike/etc/aerospike.conf
  20. ```
  21. ### access-address Configuration
  22. In order for Aerospike to properly broadcast its address to the cluster or applications, the **access-address** needs to be set in the configuration file. If it is not set, then the IP address within the container will be used, which is not accessible to other nodes.
  23. To specify **access-address** in aerospike.conf:
  24. network {
  25. service {
  26. address any # Listening IP Address
  27. port 3000 # Listening Port
  28. access-address 192.168.1.100 # IP Address to be used by applications and other nodes in the cluster.
  29. }
  30. ...
  31. ## Persistent Data Directory
  32. With Docker, the files within the container are not persisted. To persist the data, you will want to mount a directory from the host to the guest's `/opt/aerospike/data` using the `-v` option:
  33. -v <DIRECTORY>:/opt/aerospike/data
  34. Where `<DIRECTORY>` is the path to a directory containing your data files.
  35. A full example:
  36. ```console
  37. $ docker run -d -v <DIRECTORY>:/opt/aerospike/data --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server
  38. ```
  39. ## Clustering
  40. Aerospike recommends using Mesh Clustering. Mesh uses TCP point to point connections for heartbeats. Each node in the cluster maintains a heartbeat connection to all other nodes. Please see [http://www.aerospike.com/docs/operations/configure/network/heartbeat/#mesh-unicast-heartbeat](http://www.aerospike.com/docs/operations/configure/network/heartbeat/#mesh-unicast-heartbeat)
  41. ### Mesh Clustering
  42. Mesh networking requires setting up links between each node in the cluster. This can be achieved in two ways:
  43. 1. Define a configuration for each node in the cluster, as defined in [Network Heartbeat Configuration](http://www.aerospike.com/docs/operations/configure/network/heartbeat/#mesh-unicast-heartbeat).
  44. 2. Use `asinfo` to send the `tip` command, to make the node aware of another node, as defined in [tip command in asinfo](http://www.aerospike.com/docs/tools/asinfo/#tip).
  45. For more details and examples of clustering Aerospike in Docker, please see [Deploying Aerospike clusters with Docker](http://www.aerospike.com/docs/deploy_guides/docker/).
  46. ## Sending Performance Data to Aerospike
  47. Aerospike Telemetry is a feature that allows us to collect certain use data not the database data on your Aerospike Community Edition server use. We'd like to know when clusters are created and destroyed, cluster size, cluster workload, how often queries are run, whether instances are deployed purely in-memory or with Flash. Aerospike Telemetry collects information from running Community Edition server instances every 10 minutes. The data helps us to understand how the product is being used, identify issues, and create a better experience for the end user. [More Info](http://www.aerospike.com/aerospike-telemetry/)