HTTP requests in UDF


#1

Is it possible to make http requests from inside an UDF?

The use case is that we need to update a document in another database when writing to Aerospike and this needs to be consistent.

Latency is not an issue as we do locking anyway using an external key. I was thinking if it was possible to use the property of UDFs that they lock the record during execution. This would be possible if we could make an HTTP request from inside an UDF.


#2

There is nothing in the Aerospike Lua binding which will disallow outbound http requests. You’ve already identified the bigger practical concerns of latency. Another aspect to be cautious would be if the timeout of the transaction is set long enough.

Hope to hear success!