As a side note, we use traccar with forward feature and don’t use the traccar web ui. So not all db tables will be used which may require non NDB features like FULLTEXT.
Haven't tried it personally, but let us know how it works.
We don't have FULLTEXT indexes anywhere in the database, so that's not a problem.
Hello,
after installing the mySQL NDB cluster and changed NDB to be the default engine, I create a traccar db and pointed traccar to use it.
All table creation failed due to the existing of varchar(4000) fields which exceed NDB engine max row size (limited to 14kb) while varchar(4000) is 4000*4 due to db character encoding.
Two solution;
I tested option 2: CREATE DATABASE traccar
CHARACTER SET latin1
COLLATE latin1_general_ci;
now all tables are created but I wonder if this will have any affect on my setup where I'm using traccar with url forwarding. In my use case, users don't use traccar db. What I see, is the attributes field and I wonder if I'll need utf to store for example responses from devices ...
If my setup is valid, I'll test traccar in production with NDB cluster and report performance results.
I think that with NDB we'll need to use ClusterJ mysql driver. But I managed to make current jdbc driver to connect to SQL nodes like this:
<entry key='database.url'>jdbc:mysql://[10.10.1.140:3306,10.10.1.141:3306]/traccar?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
Why do you need a database if you don't use it?
I said I don’t use it because I’m not using default traccar web ui. But I think in all cases we need a database even with forward url, is this assumption incorrect? I think we’ll need it in case of traccar restart to retrieve last position and related attributes like total distance, will be used by api to send commands to devices.
Am I using forward url incorrectly? Please clarify.
To calculate distance correctly you would need a proper database, but then it means you do use the database, not just forwarding.
I think changing the encoding should be safe. Another option is to adjust the schema to have shorter fields.
let me give it a try with the latin1 encoding and report results with NDB cluster.
Hello,
I’ve just created a mysql MDB cluster with 1 management node, two data nodes and two sql nodes.
I’ve seen talks on the web about NDB being more performant than innoDB.
Does it matter for traccar if we use NDB cluster and storage engine?
Regards