Asynchronous operations
Asynchronous operations
Asynchronous operations are common in the Aerospike Node.js Client. The Client supports two methods of handling asynchronous data: promises and callbacks. Modern Node.js Projects use promises due to their superior readability and simplicity. It is recommended that developers use promises to handle asynchronous Aerospike operations rather than callbacks. Callbacks are supported primarily for legacy reasons.
Managing Aerospike connections using the Cluster module
The core Node.js library contains the Cluster module: a simple yet powerful interface designed to launch a cluster of Node.js processes. This module allows a Node.js application to take advantage of multi-core systems to handle more load than a single Node.js instance running in a single thread.