We are trying to build a system which needs to log the driver's location in real time like Uber. It needs to select the closest, online driver who is free from this data. Our API is built on NodeJS. My biggest concerns are:

How to log the location in real time.

How to do this without stressing out the server too much.

For this to work, the driver's mobile app needs to send it's the location to our server regularly. We need to choose an interval to send these updates.