How to load balance traccar

Dylan8 years ago

Good day,

I am setting up Traccar in a cloud hosted environment. (Microsoft Azure to be speicific)

In order to ensure high availability you need to load balance a service across two or more Virtual machines.

I am currently running the service on one of the virtual machines to test, however its a windows service. What I need to know is.

1: Can I have a common database shared between two instances?
2: Will these two instances not clash interns of background services?

3: Would I be able to just install the service on 3 different VMs, point them to the same SQL Database and then load balance the ports?

Thanks

Anton Tananaev8 years ago
  1. You can, but there will be problems with internal cache in Traccar.
  2. Not sure what you mean by that.
  3. It would be enough if you just run Traccar to store data in the database.

Basically Traccar has internal cache, so if you want to scale it horizontally, you need to make this cache distributed.

Dylan8 years ago

Does it have the ability to point the cache to a distributed cache? Does it just use reddis or something silly?

Anton Tananaev8 years ago

No, it does not at the moment, so it would require quite a few code changes.

Alan Lee8 years ago

Could you please show us how to change the code? Thanks!

Anton Tananaev8 years ago

If you need help with customisation of Traccar please send an email to support address to discuss it.