Closed
Bug 1433927
Opened 8 years ago
Closed 8 years ago
[Internet Connection Quality] Distribute a file through the CDN
Categories
(Data Platform and Tools Graveyard :: Operations, enhancement)
Data Platform and Tools Graveyard
Operations
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Dexter, Assigned: oremj)
References
Details
(Whiteboard: [DataOps])
Attachments
(1 file)
|
4.00 MB,
application/octet-stream
|
Details |
In order to support the ICQ study [1], we need to host and distribute a 4MB file through our CDN.
On our end, we would need to record some sort of endpoint identifier (e.g. the IP of the serving endpoint?) to have a rough idea of the distance between the downloader and the host.
The file would probably need to be served with the 'Timing-Allow-Origin' header allowing all locations to get the performance timings out of the Resource Performance API [2].
We're aiming to deploy the study by the end of February.
[1] - https://docs.google.com/document/d/192hj8noNrkf2sgw-DYaNRFdHHKzGBLDb_bqVigQK27A/edit#
[2] - https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API#Resource_loading_timestamps
Updated•8 years ago
|
Whiteboard: [DataOps]
Updated•8 years ago
|
Assignee: nobody → oremj
| Assignee | ||
Comment 1•8 years ago
|
||
I was planning on using Akamai or Cloudfront for this, so the IP would change on each request. Can you use the DNS lookup to record the IP? What file do you want me to serve? If it isn't a specific file, how big should the file be and what content-type should I send?
Flags: needinfo?(alessio.placitelli)
| Assignee | ||
Comment 2•8 years ago
|
||
Sorry, I just saw the 4MB requirement, so never mind on that part of the question.
| Reporter | ||
Comment 3•8 years ago
|
||
(In reply to Jeremy Orem [:oremj] from comment #1)
> I was planning on using Akamai or Cloudfront for this, so the IP would
> change on each request. Can you use the DNS lookup to record the IP?
We might need both Akamai and Cloudfront. I'll clear that up and let you know if just one CDN is enough for this study.
I'm afraid we cannot do that on our end. While there's an internal chrome service [1] that would do that, the measurements API [2] works only in content processes. Moreover, as far as I know, there's no way to get the resolved address out of an XMLHttpRequest in content. This means that we would need to perform a request twice even if we were to use [1], with no guarantee of the DNS name being resolved to the same IP address.
> ... what content-type should I send?
"application/octed-stream" should be fine for this.
Do you know if we need to specify 'Access-Control-Allow-Origin:*' in addition to the 'Timing-Allow-Origin:*' here?
[1] - https://searchfox.org/mozilla-central/source/netwerk/dns/nsIDNSService.idl
[2] - https://developer.mozilla.org/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API
Flags: needinfo?(alessio.placitelli)
| Assignee | ||
Comment 4•8 years ago
|
||
Everything looks pretty straightforward except for the "IP of the serving endpoint" part. We don't have a way to provide that information in the response from the CDN edge node.
Any chance you can use https://developer.chrome.com/extensions/webRequest#event-onResponseStarted a listener will receive the ip in the details object.
Flags: needinfo?(alessio.placitelli)
| Reporter | ||
Comment 5•8 years ago
|
||
(In reply to Jeremy Orem [:oremj] from comment #4)
> Everything looks pretty straightforward except for the "IP of the serving
> endpoint" part. We don't have a way to provide that information in the
> response from the CDN edge node.
I see, no problem then. Let's just pick one CDN (either Akamai or Cloudfront).
> Any chance you can use
> https://developer.chrome.com/extensions/webRequest#event-onResponseStarted a
> listener will receive the ip in the details object.
Nope, as the request starts from the "content", and that is an extension API which is not exposed to web pages.
One non reliable workaround could be to make two requests from different processes: we might have a slight chance for the endpoint to change though.
Flags: needinfo?(alessio.placitelli)
| Reporter | ||
Comment 6•8 years ago
|
||
| Reporter | ||
Comment 7•8 years ago
|
||
(In reply to Alessio Placitelli [:Dexter] from comment #6)
> Created attachment 8949014 [details]
> 1cd880ae9d0048588cb7a94e840699ec
We can use this file. It was generated with:
> head -c 4M </dev/urandom >1cd880ae9d0048588cb7a94e840699ec
| Assignee | ||
Comment 8•8 years ago
|
||
Do you have a preferred name? SOMETHING.cdn.mozilla.net
Flags: needinfo?(alessio.placitelli)
| Reporter | ||
Comment 9•8 years ago
|
||
(In reply to Jeremy Orem [:oremj] from comment #8)
> Do you have a preferred name? SOMETHING.cdn.mozilla.net
I'd say icqv1.cdn.mozilla.net is fine. Can this be HTTPS only?
Flags: needinfo?(alessio.placitelli)
| Reporter | ||
Comment 10•8 years ago
|
||
Jeremy, do you have a rough estimate on when the file will be available for downloading?
Flags: needinfo?(oremj)
| Assignee | ||
Comment 11•8 years ago
|
||
Done: https://icqv1.cdn.mozilla.net/1cd880ae9d0048588cb7a94e840699ec This is hosted on S3/Cloudfront at the moment.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(oremj)
Resolution: --- → FIXED
| Reporter | ||
Comment 12•8 years ago
|
||
Hey Jeremy, looks like none of the headers from comment 3 is being returned when requesting the file. Would you mind kindly checking?
Status: RESOLVED → VERIFIED
Flags: needinfo?(oremj)
| Reporter | ||
Updated•8 years ago
|
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 13•8 years ago
|
||
I've added access-control-allow-origin and timing-allow-origin.
Flags: needinfo?(oremj)
| Assignee | ||
Updated•8 years ago
|
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
Updated•3 years ago
|
Product: Data Platform and Tools → Data Platform and Tools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•