Repository navigation
ArcadeDB Graph Data Ingestion — Performance & Issues on HA Cluster #4040
Replies: 1 comment 1 reply
|
Hi @babasaikiran I fixed the 500 error with the But if you use async insertion, you can go much much faster. The dedicated bulk path is /api/v1/batch/{db} - the same endpoint you got stuck on (now fixed). It's designed exactly for this scenario:
For you use case 17.9K nodes + 30.6K edges that would collapse from ~25 minutes to seconds. Order of speed-ups, best first:
Note for HA: every write hits the leader regardless of which node received it (follower forwards), so issuing 30K individual CREATE EDGE calls means 30K Raft rounds. That's the real bottleneck, not the HTTP layer. /batch collapses those into one. |
Uh oh!
There was an error while loading. Please reload this page.
Dataset
What we do
Step 1: Load & Analyze
nodes.jsonandedges.json(flat JSON arrays)node_type→ becomes ArcadeDB vertex type (e.g. Switch, VM, vPortgroup)relation_type→ becomes ArcadeDB edge type (e.g. connected-by, runs)Step 2: Schema Setup
node_idproperty + UNIQUE index on every vertex typeleft_id/right_idproperties + NOTUNIQUE indexes on every edge typeStep 3: Insert Nodes
INSERT INTO Type CONTENT [{...}, {...}, ...]with batches of 200Step 4: RID Map Fetch
node_id → @ridmapping viaSELECT node_id, @rid AS rid FROM Type LIMIT 1000 SKIP NWHERE node_id = 'xxx'lookupsFROM #12:0 TO #14:7) are much faster than subquery lookupsStep 5: Insert Edges
CREATE EDGE Type FROM #rid TO #rid SET key = val, key = val, ...Step 6: Verify & Log
Performance Summary
All of these work fine on standalone — they only fail on the HA cluster.
Question
Is there a faster way to ingest edges with properties on an HA cluster?
Currently we're limited to ~24 edges/sec because each edge needs an individual HTTP call. We tried:
/batchendpoint — returns HTTP 500 (JSONObject[@type] not found)/commandrejects multi-statement inputBEGIN/COMMITwrappers — silently drops edgesCONTENT {...}onCREATE EDGE— silently drops propertiesThe only reliable approach we found is individual
CREATE EDGE ... SET ...statements, one per HTTP call. For 30K edges on a 3-node HA cluster, this takes ~20 minutes.Is there a bulk edge creation API, binary protocol, or configuration we're missing that would improve this throughput?
ArcadeDB Graph Data Ingestion — Performance & Issues on HA Cluster
Dataset
What we do
Step 1: Load & Analyze
nodes.jsonandedges.json(flat JSON arrays)node_type→ becomes ArcadeDB vertex type (e.g. Switch, VM, vPortgroup)relation_type→ becomes ArcadeDB edge type (e.g. connected-by, runs)Step 2: Schema Setup
node_idproperty + UNIQUE index on every vertex typeleft_id/right_idproperties + NOTUNIQUE indexes on every edge typeStep 3: Insert Nodes
INSERT INTO Type CONTENT [{...}, {...}, ...]with batches of 200Step 4: RID Map Fetch
node_id → @ridmapping viaSELECT node_id, @rid AS rid FROM Type LIMIT 1000 SKIP NWHERE node_id = 'xxx'lookupsFROM #12:0 TO #14:7) are much faster than subquery lookupsStep 5: Insert Edges
CREATE EDGE Type FROM #rid TO #rid SET key = val, key = val, ...Step 6: Verify & Log
Performance Summary
All of these are on standalone — the ingestion fails directly on the HA cluster.
Question
Is there a faster way to ingest edges with properties on an HA cluster?
Currently we're limited to ~24 edges/sec because each edge needs an individual HTTP call. We tried:
/batchendpoint — returns HTTP 500 (JSONObject[@type] not found)/commandrejects multi-statement inputBEGIN/COMMITwrappers — silently drops edgesCONTENT {...}onCREATE EDGE— silently drops propertiesThe only reliable approach we found is individual
CREATE EDGE ... SET ...statements, one per HTTP call. For 30K edges on a 3-node HA cluster, this takes ~20 minutes.Is there a bulk edge creation API, binary protocol, or configuration we're missing that would improve this throughput?
All reactions