Skip to content

Overview: Aerospike Go client

For the complete documentation index see: llms.txt

All documentation pages available in markdown.

The Aerospike Go client is a production-ready library for building high-performance applications on Aerospike Database. It implements Aerospike network protocols in pure Go, is goroutine friendly, and exposes the full database feature set: single-record create, read, update, and delete (CRUD), atomic multi-bin operations, batch reads and writes, indexed queries, collection data types (CDTs), user-defined functions (UDFs), and concurrent access patterns using Go’s native concurrency primitives.

Install with go get github.com/aerospike/aerospike-client-go/v8. See Installation for supported Go and OS versions.

Feature highlights

Record operations:

Query and scan:

Multi-record operations:

Collection data types:

  • Lists and maps: Create, read, and modify List and Map bins with atomic server-side operations.
  • Nested CDTs: Work with deeply nested structures using CDT context and nested list and map operations.

Server-side logic:

Operations and observability:

  • Policies: Tune timeouts, retries, consistency, and write behavior with client policies.
  • Metrics: Collect cluster connection stats and extended command latency metrics. See Monitor performance.
  • Error details: Read server subcodes, messages, and expression traces from *as.AerospikeError when Aerospike Database 8.2.0 and later returns them (Go client 8.9.0 and later). See Error handling.
  • Asynchronous patterns: Run concurrent reads and writes with goroutines and channels. See the Asynchronous API guide.
  • Security: Connect with username/password authentication, TLS, and mutual TLS (mTLS). See Connecting.

Data types:

  • Full support for Aerospike scalar and collection data types, including Lists, Maps, HyperLogLog, and geospatial bins.
  • String operations: Search, transform, and normalize text in String bins on the server with String operations (Go client 8.9.0 and later, Aerospike Database 8.2.0 and later).

See the release notes for version history.

Ready to get started?

Installation

Install the client with go get and verify your Go and Aerospike Database versions.

Installation →

Policies

Configure timeouts, retries, consistency modes, and write behavior for your workload.

Policies →

Error handling

Handle client errors and interpret server result codes in your application.

Error handling →