How to store a file in anki with syncing it across all the devices?

I’m creating an Anki addon in which I want to store a different file for all users of Anki and I also want to sync that file across all the devices to which that user’s Anki account is connected.

So basically, let that file name be data.csv. data.csv file contains different data for all the users and it also gets synced to the Anki server.

Now I want to create, edit and manage data.csv. How to do that in Anki without compromising Anki’s performance

Note: This file won’t be big

It going to contain 3 floating point numbers for each time a user reviews a card (it doesn’t matter if the review is for 1st time or for nth time)
By calculation, that file is about ~13,672 KB if the user had reviewed 400,000 cards i.e. ~34.18 Byte for 1 card.

You can store the data under mw.col.conf to be synced to AnkiWeb, but heed the warning in the add-on docs:

If you need the data to sync across devices, small options can be stored within mw.col.conf. Please don’t store large amounts of data there, as it’s currently sent on every sync.

Another option is to have your own dedicated server for that. You can then sync the file to the user_files subfolder in your add-on folder so that it gets preserved between add-on updates.

Can we store at least 15MB of data in there

If this file is going to change frequently, it’s not appropriate to store in the media folder, as that’s going to require a 15MB sync every time the file changes. You’ll need to look into synchronizing that data in some other way, such as with a web service you create.