-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make network requests serially in network connection #646
Labels
category:breaking_change
A breaking change will be introduced if this issue is completed.
status:completed
Completed - but might not be released yet.
Milestone
Comments
matus-tomlein
added
the
category:breaking_change
A breaking change will be introduced if this issue is completed.
label
Nov 29, 2023
matus-tomlein
added a commit
that referenced
this issue
Nov 30, 2023
matus-tomlein
added a commit
that referenced
this issue
Nov 30, 2023
matus-tomlein
added a commit
that referenced
this issue
Nov 30, 2023
matus-tomlein
added a commit
that referenced
this issue
Nov 30, 2023
matus-tomlein
added a commit
that referenced
this issue
Dec 1, 2023
matus-tomlein
added a commit
that referenced
this issue
Dec 1, 2023
matus-tomlein
added a commit
that referenced
this issue
Dec 1, 2023
matus-tomlein
added a commit
that referenced
this issue
Dec 8, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
category:breaking_change
A breaking change will be introduced if this issue is completed.
status:completed
Completed - but might not be released yet.
Background
There are 2 settings in the emitter – buffer option (default 10) and emit range (default 150). Buffer option is the number of events that have to pile up before the tracker makes a request. Emit range is the number of events that can be sent in one iteration of the emitter (basically at once).
If due to collector being down, 200 events pile up in the event queue on the tracker, the emitter will make 15 requests with 10 events and fire them at the same time to the collector (because emit range is 150 and buffer size is 10 so max 10 events fit in one request => 15 requests).
Problem
The goal of making parallel requests is to send the events to the collector faster. However, after doing some tests, this does not seem to be the case in practice – sending 500 events in batches of 25 per request takes around the same total time to finish when making requests in parallel as it does when making requests serially.
Moreover, making requests in parallel increases the likelihood of duplicate events ending up in the warehouse. If there is a problem with the network connection while the requests are made, more events will be resent. Also making multiple requests at once increases the chance of network failures on weaker connections.
Suggestion
The suggested approach is to:
NetworkConnection
to receive one request at a time.Same issue on the iOS tracker.
The text was updated successfully, but these errors were encountered: