Limitation of server for scalability

jaimzj8 years ago

Thank You Anton, I managed to get it up and running :)

I tested with VPSdime service providers basic VPS, I was able to manage to not exceed their Terms of Usage,.
Load Average of 2 or less.

with the following configuration

Devices Online : 5000
Device Update Interval : 5 seconds.

Devices Online : 7500
Device Update Interval : 10 seconds.

The only bottle neck or issue, is the database/storage as you mentioned earlier in the thread (which again, I used Google Cloud SQL)

Anton Tananaev8 years ago

Thanks for sharing the information.

Jeff Moe8 years ago

If the bottleneck is currently MySQL, that is easily solved as scaling up MySQL is a well known task with readily available solutions that aren't unique to traccar.

Can traccar handle running multiple instances behind a reverse proxy? Or will they conflict? If it can, then you can set up a front-end reverse proxy server, which passes traffic to multiple traccar servers. The multiple traccar servers can also point to a MySQL replicated cluster.

Another brainstorm, is you could have multiple traccar servers all pointing to the same database. But one of the servers is just for viewing, one gets devices ABCD, another gets devices EFGH, etc. That way you distribute the load across multiple servers, each handling a part of the task. This will only work if multiple traccar servers can point at a single database though.

Also, if MySQL is the bottleneck and Postgres is slower, you could look at using MariaDB which wouldn't be "too" hard to implement, I'm guessing.

Happy hacking,

-Jeff

Anton Tananaev8 years ago

Multiple instances of Traccar would conflict because GPS devices can only be connected to one of the instances.

The only solution I can think of is to run several instances of Traccar and split them by users. Then have some custom proxy in front to forward request to a particular server depending on a logged in user.

MariaDB is a fork of MySQL, so it would have same/similar performance.

How can I go for horizontal scaling as cache is maintained internally using map data structure.?

Anton Tananaev7 years ago

You would need to change caching system.

jcorreajr7 years ago

Some time we talked about the possibilities of horizontally scaling the Traccar in this Link

Changing the Traccar cache system to Memcached or Redis requires a large amount of modified code?
I'm not a developer, but in order to get an idea, would it be a job that would take a long time?

Anton Tananaev7 years ago

It's a relatively big change.

sachin.terdale6 years ago

Hi Anton

Apologies for asking these questions, I am bit new to these concepts and terminologies and technologies.

Is there any change need to be done in database if this script need to be implemented . Any specific device name or device ID need to be changed or script need to be adapted accordingly.

I assume it would insert the data in database for all the entries.

how to run the script.

Is this script only run for 5027 port would it be used for 5055 as well, is there any change need to be done in script for it

sachin.terdale6 years ago

Hi Anton

added the device 123456789012345 in and it seems script is working.