High availability and load balancing

Techno2 years ago

Traccar is a great application. Its been discussed multiple times that we cannot achieve horizontal scaling using traccar application as there are two limitations.

  1. Internal cache
  2. Sending commands using device TCP connection

We can solve first problem by using distributed cache like Redis but how we can solve sending commands limitation?

I just create this conversion if someone already implement Redis in traccar please share what issues/Challenge you faced and how you resolve that also how you solve sending commands issue ?

Sanjay Shah2 years ago

Hi I see some work in progress on this distributed computing in the github.

I would like to put forth one more suggestion, if we can have two servers, one which can listen to device and insert in database and the other which can provide the reports / events as and when asked for.

Currently the database is locked by one server so other traccar server cannot connect to the database.

Anton Tananaev2 years ago

What do you mean by "database is locked"? All modern databases support multiple concurrent connections.

Also, obviously if you plan to scale Traccar server you should scale the database. You would probably need a database cluster with proper configuration to be able to handle the load you're expecting to have.

Sanjay Shah2 years ago

Please try using two traccar server connecting to one mysql database.

The case i am trying to suggest is that device talk to one server which is acting as listener.

But the application may be some other server for the users. If we separate these two, the performance is bound to improve.