I was using the following REST API to upload events to the backend.
And noticed that if two uploads were within a short time period, e.g. 5 minutes, the event in the second upload often got lost. By lost, I mean the API returned code 200 but the event was not synced to my database.
I tried the TreasureData's Android client SDK, which uses the following REST API, and got the same behavior, e.g. by calling TreasureData.sharedInstance().uploadEvents() twice in a short time period.
I reported this here: https://github.com/treasure-data/td-android-sdk/issues/27
And understood that this is due to the endpoint server's throughput limitation.
What I wanted to ask for is: since in such cases, the API returns 200 even though the event will not be synced to the database, the application has no way to know the event is getting lost, which seems dangerous to me. So, I was suggesting for the REST API server to return a specific error code for such requests, so that the application can recognize it and handle it properly, e.g. retry the upload at a later time.