bfabiszewski / ulogger-server

μlogger • web viewer for tracks uploaded with μlogger mobile client
GNU General Public License v3.0
518 stars 84 forks source link

high bandwidth usage #228

Open joefrancois opened 1 month ago

joefrancois commented 1 month ago

We use of 2Gb of data after one day of usage, how can I lower the bandwidth usage of the app?

bfabiszewski commented 1 month ago

If you mean data exchanged between the server and the client, this is very high usage.

Data is sent to the server as a POST request. Data itself for a single position is about 150 B. It is send along with headers, so in total it is about 470 B. If you attach an image to the position you must of course add the size of the image. The server response size depends on server type, but will probably be also around 400 B. There is some overhead of each connection when protocols are negotiated, but also some compression may be used. The overhead will be smaller if positions are send together, etc. But I think we can safely calculate that 1 position uses around 1 kB of exchanged data between client and server. This is without any images attached. So you can roughly calculate data usage by number of positions uploaded x 1 kB plus size of all images uploaded. So your usage of 2 GB (>2.000.000 kB) should allow to upload 2.000.000 positions without any images. Which is a lot.

So the question is how many positions did you upload during that day? Did you also upload any images?