I have built an event api using php with use of cassandra and phpcassa.
Recently, I authored a node.js + helenus replacement of the same api. After I finished, I started to benchmark the node.js code with ab tool. However, after 1000+ inserts on cassandra, the connection can be lost and failover code is running. I'm inserting async to cassandra after each request occur.
I am instantiating ConnectionPool
object when the node app starts. However, I use pool.connect()
function in each request.
Does pool.connect()
starts a new connection or binds the existing connection from ConnectionPool
object ?
Notes:
In phpcassa, I didn't have such problems probably because I'm inserting to cassandra sync.
I'm using 5 cassandra nodes