Open fortuna opened 1 year ago
This approach should also help with DNS caching. The first result may take longer because the browser needs to resolve the domain name first. By taking the median, you are less likely to be affected by DNS caching.
There is a tradeoff here between more precision vs more extensive coverage of target sites. I think it's an important thing to think about and we should have a conversation of how we can come up with the right balance for this.
A thing worth investigating is if we can add some additional parallelism to the requests and if that would help.
I agree on finding a balance. I personally prefer more reliable measurements of important sites versus covering more sites.
You may consider 2 fetches instead of one, to at least mitigate caching. Without that it's not practical to compare timing of the measurements.
You might parallelize different domains, but the requests for a single domain must be sequential. Otherwise the second request will not use the cached first response.
Timing information in the web probe is very valuable. However, timing can be unreliable.
Please fetch and record each resource 3 times, so we can take the median time. That should apply to IP fetches too.
Taking the median has proven to be a lot more reliable in my past experience with web probes.
I also recommend adding "priority": "high" to the fetch request to reduce interference or delays.