Delay in sending data from GSM to Database

Hello,

I am using GSM SIM 800L with a Teensy 3.2 board. I want to send data every 2ms from Teensy via GSM to my database. I tried sending it but I cannot get consistent data, if I do not put delay after some HTTP commands. I am fine with putting delay after commands used in setup() function. I do not want any delay under my 2ms task. Is there a way to get consistent data in my database without using any delay?

By consistent data, what I mean is - If there is no delay in 2ms task after HTTPACTION command, I do not receive all values in the database. The counter jumps from 1 to 15 and so on. I miss the data in between.

I can share the code if required.

Thanks in advance.

It would be good if you provide few more information on how you are making call to database from GSM(Say like Rest call or …???). Based on which people can provide solutions to your problem.

BTW 2ms is very frequent, did you check the time taken by GSM module to make a single successful call to database. Based on that info do the math and calculate how frequent you can make the HTTP calls to database using GSM module. As 2ms is very short window for GSM module to make HTTP calls this might be the reason you are not receiving all values after each HTTP action.

Every 2 milli seconds is unrealistic on a 2G module that too by HTTP.
You can expect to send every 10 seconds reliably on 2G network.
Using TCP/MQTT you can send faster data around every 3 seconds max. Faster would mean missed packets.