arcadedb
arcadedb copied to clipboard
Kubernetes cluster with 3 replicas using http Api fails to deal transactions
ArcadeDB Version: 22.1.3-SNAPSHOT
JDK Version: 17
OS: Linux
Expected behavior
I have started a Kunerbetes cluster with Arcade with 3 replicas The arcade-http service acts as a loadbalancer, in front of the 3 arcade-db0, arcade-db1, arcade-db2 pods Using http API in three phases
- phase 1 : begin transaction, receive the arcadedb-session-id
- phase 2 : command transaction (create vertex for example), sending arcadedb-session-id in the payload
- phase 3 : commit, sending arcadedb-session-id in the payload
The 3 http api calls should always be successful
I have tried to use the SQLBatch way (a command "begin; create vertex..; commit;") but I got a syntax error on "create"). The doc says it is available for all the drivers, seams not.
Actual behavior
The cluster starts normally, the 3 pods synchronize each other as expected. Due to the loadbalancer, the http Api calls are sent ramdonly to the 3 pods, The begin transaction sends back a arcade-session-id for the first pod. But this session-id doesn't exist for the 2 other pods, the phase 2 and 3 fail.
Steps to reproduce
Create a Kubernetes cluster, use the standard arcade-statefulset.yaml file (replicat 3) Here a nodejs sample file for test
Thanks for your help
PS : I have not found an equivalent statefulset yaml file for OrientDB, would be very valuable !
LectureMessageInsertArcadeDB.txt arcadedb-statefulsetSCALEWAY.txt
The session id is kept under one server only and it's not distributed until the commit. So once begun, the load balancer should stick to the server where the TX was started.
Closing the issue because of no feedback from the author. If you're still working on this issue, please comment to have this reopened. Thanks.