Horizontal Scaling

Roy Jones3 years ago

I've been running a Traccar instance in Digital Ocean for several years and I'm interested in upgrading to the latest version and implementing the new horizontal scaling feature. It looks to me like most VPS providers, including Digital Ocean, don't allow multicast on their platforms with the notable exception of AWS and their transit gateway. Is anyone implementing the horizontal scaling through any other method to get around multicast limits? Maybe something like a virtual overlay network?

Anton Tananaev3 years ago

It should be fairly easy to implement an alternative option. You need another BroadcastService implementation. It could be a simple UDP or something else.

Roy Jones3 years ago

Thanks Anton, I appreciate the quick response. I'll take a look.

SwayDev3 years ago

I use VPS from Contabo, They allow multicast, and Horizontal Scaling works well.

Track-trace3 years ago

@SwayDev

Can you show me your usecase for horizontal scaling...

SwayDev3 years ago

I use it for vehicle tracking, and have about 3 vps with traccar and one vps with database.

Track-trace3 years ago

@SwayDev

Actually i mean the quantity of devices you use.. since i wonder that one traccar server with good hardware should at least scale to thousands of devices. So do you need to use scaling for that or are there other reasons / benefits.

SwayDev3 years ago

Ahh okay, I use it to isolate different gps hardwares into a group of traccar nodes. So every node Or group of nodes can be dedicated to a specific make or model of tracker.

In addition I use it for service availability or HA

Track-trace3 years ago

Ok, thanks.. thinking about horizontal scaling, i would guesse that eventually the database server would become the bottleneck since all traccar servers point to the same database server..

SwayDev3 years ago

I think a separate topic maybe good to discuss database with horizontal scaling. As this topic is about multicast support mainly.

Adam3 years ago

i have implement horizontal scalling with server A and server B. and setup nginx as load balancer, multicast message forward to all network.
when device A connect to server A, and i send a command to server B (/api/commands/send). the command not received on device A and response api 202 Accept, but when i send command to server A (/api/commands/send), the device A receive the command.

Anton Tananaev3 years ago

That's expected. It's a limitation of commands. We use unidirectional notifications, so we don't know the result. But if device is connected to any server, it should work.

Adam3 years ago

if expected, how load balancer, route to server where the device connected the server. if LB wrong route where device not connected the server. the command will not receive to device..

Anton Tananaev3 years ago

Not sure I understand the question. Server doesn't use load balancer to send commands. It uses multicast.

Adam3 years ago

i mean, i send command to /api/commands/send.. where LB forward to server A:8082 and server B: 8082..
how i correctly to send command?