Single event loop is shared among 8 threads. event loop capacity is set to 8.
aerospike_key_operate_async() with pipeline enabled is called on with same event loop.
Observation -
Since 64 connections by default with pipeline enabled, with 4 nodes - seeing 1040 connections max. Most of the connections are unused, some connections have netstat send-q piled up.
Expected behavior -
Connections as per client’s documentation code, it should be 64x4 = 256 total.?
Are we using the C client correctly where we are instantiating as_cluster per node from 1 host? I noticed that aerospike C client has some global variables.
Does aerospike C Client discover a seed automatically and add it to the cluster?
I see “Add seed xxx” in my logs. All 4 nodes have their own instances, how to avoid see discovering?
Thanks @kporter for the video. It doesn’t touch upon what I am looking for.
I have 2 single node cluster, when c client connects to 1 node, it is also adding a seed for node2 that I don’t want it to do. Anyway I can avoid this? The reason is - we use C Client to do put/get on particular node. No replication factor is involved, no failover is involved.
If a record is sent to a specific node in the cluster and that node does not own the record, the record will be forwarded to the node that does own the record.
The only way to guarantee a record stays on a node is to use a single node cluster. In your case, create 2 separate clusters where each cluster contains a single node.
I have 2 separate single node clusters.
However, aerospike_connect() to node1 is adding a seed node2 to its list. How does it discover other nodes and add them as seed nodes even in a 2 independent single node cluster scenario?
Please check my original description and see if I am missing anything or doing it incorrectly.
oh no! found this in the log -
INFO (info): (ticker.c:168) NODE-ID bb9ba91cd3e1600 CLUSTER-SIZE 2
how do I make them 2 independent single node clusters? 2 nodes are running as 2 separate clusters of size 1, atleast intended to.
2020 01:02:07 GMT: INFO (info): (ticker.c:168) NODE-ID bb9ba91cd3e1600 CLUSTER-SIZE 2
This is what I have in aerospike.conf -
I didn’t change anything related to heartbeat, its default.
network {
service {
address any
port 3000
}
heartbeat {
mode multicast
multicast-group 239.1.99.222
port 9918
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
Making the multi-cast group address unique per node fixed it to be 2 single node clusters. This also fixed the mystery of ‘?’ number of aerospike connections.