Failover/loadbalancing multiple traccar servers with shared database

AlfSolli4 years ago

Is it possible to run two (or more) instances of the traccar server process on different machines with identical config files, all pointing to the same mysql database? And to network load balancing in front of them? ..without causing any sort of conflict/duplicate keys etc in the database?

I'm thinking galera cluster for mysql.
Round-robin network loadbalancing of incoming device traffic (gps trackers).
Round-robin or if necessary; primary-standby for API access.

Anton Tananaev4 years ago

This has been discussed several times and the answer is NO. Traccar does not support horizontal scaling yet.

AlfSolli4 years ago

I'll do a more thorough search next time. Thanks for your time.

AlfSolli4 years ago

Sorry, but traccar in a master/Standby configuration (for example with linux HA) would work, given only one instance is running at any time?
I'm more worried about downtime than the possible load.

Anton Tananaev4 years ago

Yes, master/standby should work.

AlfSolli4 years ago

Thank you :)

Long explanation, no need to read; We're using this for documentation for use of company cars. Accounting will tear me a new one if I mess with their numbers, so I am extremely cautious setting stuff up and just hope it'll work. Might look that way for a while, then disaster strikes in some form or another.
Having redundant database and application servers will decrease downtime by a lot, and even allow upgrades and reboots without loosing enough data to notice. ...not to mention, allows me to have an uninterrupted day off once every now and then. :p