Aerospike: Up and Running

Book description

If you're a developer looking to build a distributed, resilient, scalable, high-performance application, you may be evaluating distributed SQL and NoSQL solutions. Perhaps you're considering the Aerospike database.

This practical book shows developers, architects, and engineers how to get the highly scalable and extremely low-latency Aerospike database up and running. You will learn how to power your globally distributed applications and take advantage of Aerospike's hybrid memory architecture with the real-time performance of in-memory plus dependable persistence. After reading this book, you'll be able to build applications that can process up to tens of millions of transactions per second for millions of concurrent users on any scale of data.

This practical guide provides:

  • Step-by-step instructions on installing and connecting to Aerospike
  • A clear explanation of the programming models available
  • All the advice you need to develop your Aerospike application
  • Coverage of issues such as administration, connectors, consistency, and security
  • Code examples and tutorials to get you up and running quickly
  • And more

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Conventions Used in This Book
    2. O’Reilly Online Learning
    3. How to Contact Us
    4. Acknowledgments
  2. 1. Introduction to Aerospike
    1. What Makes Aerospike Different
      1. Availability and Consistency (AP and CP Modes)
      2. Flash Optimization
    2. What Makes Aerospike Optimal for Submillisecond Workloads
      1. Avoiding Hotspots with Shared-Nothing Architecture
      2. Keeping Performance Predictable with Resilient Stability
      3. Reducing Cluster Size with Optimal Use of Each Node
    3. Why Milliseconds Matter
    4. Summary
  3. 2. Developing Your First Aerospike Application
    1. Installing Aerospike
      1. Installing Aerospike on Windows or a Mac
      2. Installing Aerospike on Linux
      3. Deployments Made Simple with AeroLab
    2. Aerospike Terminology
    3. Simple First Application
      1. Establishing a Connection to the Database
      2. Inserting and Retrieving Data
    4. Using Aerospike Quick Look
    5. Policies
    6. Summary
  4. 3. Basic Operations
    1. CRUD Operations
      1. Data Types
      2. Data Lifecycle
      3. Create
      4. Read
      5. Update
      6. Delete
      7. Lightweight Operations
      8. Batch
    2. Summary
  5. 4. Advanced Operations
    1. The operate() Command
      1. Simplifying the Program
      2. The Operation Class
      3. ListOperation and MapOperation
      4. Inverted Flag
      5. Contexts
    2. Expressions
      1. Filter Expressions
      2. Trilean Logic
      3. Read Expressions
    3. Batch Operations
      1. Batch Writes
      2. Arbitrary Batch Operations
      3. Secondary Indexes
      4. Using the Secondary Index
      5. Multiple Predicate Queries
    4. Summary
  6. 5. Architecture
    1. Scale Out
      1. Shared-Nothing Database Cluster
      2. Data Distribution
      3. Cluster Self-Management
      4. Cluster View
      5. Cluster View Changes
      6. Intelligent Clients
      7. Cluster Node Handling
    2. Scale Up
      1. Hybrid Memory Architecture
      2. Multicore Processors
      3. Memory Fragmentation
      4. Data Structure Design
      5. Scheduling and Prioritization
      6. Parallelism
    3. Distributed Transaction Consistency
      1. Strong Consistency in Transactions
      2. Roster
      3. Split-Brain Conditions
      4. Writes
      5. Rack Awareness
    4. Summary
  7. 6. Data Modeling
    1. Aerospike Data Modeling
    2. Secondary Indexes
    3. Aggregating Subobjects into One Record
    4. Aggregating Subobjects into Multiple Records
      1. Additional Operations on This Model
      2. Further Refinements
    5. Associating Objects
      1. Updating Relationships
      2. Reading Related Objects
      3. Storing of IDs
    6. Other Common Data Modeling Problems
      1. External ID Resolution
      2. The Very Small Object Problem
      3. Expiry of Map Entries
    7. Summary
  8. 7. Administration, Tools, and Configuration
    1. Configuration
      1. Anatomy of a Config File
      2. Dynamic Configuration
    2. Tools
      1. asinfo
      2. asadm
      3. Aerospike Quick Look
      4. asbackup and asrestore
      5. asloglatency and asbench
    3. Security
    4. Summary
  9. 8. Monitoring and Best Practices
    1. Monitoring
      1. Application Metrics
      2. Aerospike Database Metrics
      3. Prometheus
      4. Metrics Reference
      5. Alert Rules and Dashboards
    2. Software Updates
      1. Preparation
      2. Upgrade
      3. Quiesce
    3. Troubleshooting
    4. Summary
  10. 9. Advanced Concepts
    1. Synchronous Active-Active System
    2. Asynchronous System
      1. Active-Passive Topologies
      2. Active-Active Topologies
      3. Shipping Strategy
      4. Rewind
      5. Convergence
      6. Non-Aerospike Destinations
      7. Ordering Limitations
    3. Strong Consistency Can Be Fast
    4. Summary
  11. 10. Aerospike Practical Examples
    1. User Profile Store
      1. Data Model
      2. Expiry of Elements
    2. Customer 360
      1. Data Model
    3. Fraud Detection
      1. Brute Force
      2. Decision Trees or Neural Networks
      3. Vectors
    4. Summary
  12. Index
  13. About the Authors

Product information

  • Title: Aerospike: Up and Running
  • Author(s): V. Srinivasan, Tim Faulkes, Albert Autin, Paige Roberts
  • Release date: October 2024
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098155605