Using C Client in Lua in Non-Blocking Context


Aerospike has a page at on getting a C client running in a Lua app.

In particular I would like to run a client within the OpenResty Nginx ecosystem.

QUESTION: Is this approach non-blocking in something like OpenResty, or can it be if not? QUESTION: Is non-blocking the key driver for performance in this context? I am assuming non-blocking is the fastest, but wanted to make sure that assumption was correct.

I was also wondering about the distinction between non-blocking and asynchronous in the C Client context with Lua.

Thank you for any information.


We have not attempted in-housing running the lab version of the Aerospike lua client in a production environment. The lab code is a proof-of-concept. We’d want to hear from the community any experience, particularly if any special steps are needed for integrating with OpenResty.

Re: performance on blocking/non-blocking calls - even though in theory that async calls allows applications to pump as many requests as possible, it can also easily bring a system to its knees without careful consideration of overloading and throttling. The async models are generally harder to understand and harder to adopt.

In short, Aerospike is already a high performance system, and provide more than plenty for headroom for applications in synchronous environment. This is the best place to start.


Thank you for the info on this wchu. Is there a preferred platform at Aerospike in which to use a client from? For example, a C client or Java or Lua.


Java, C#, or C would be the best choices, with the most production deployments. After that, there are also Node.js, Go, Ruby, PHP, Python libraries.

Lua would not be a good choice, since it is not a fully supported SDK.