I'm building an audiobook app and have uploaded the audio files on Firebase Storage. My problem is that I experience different performances in San Francisco vs Toronto. I am under the impression that Firebase Storage has built-in CDN. if so, Do I need to enable it somewhere? if not, how do I add GCP CDN to my Firebase Storage files behind Firebase Auth??
Checking the domain storage.googleapis.com
which is where my Firebase Storage files are hosted shows that it is using the Google CDN.
Here are the response headers for one of my public audio file request:
accept-ranges: bytes
alt-svc: quic=":443"; ma=2592000; v="46,44,43,39"
cache-control: public, max-age=3600
content-disposition: inline; filename*=utf-8''G4PT7dPIyEuIz74BtTmm_FallIsTheLastSeasonOfTheYear.mp3
content-length: 3162637
content-type: audio/mp3
date: Tue, 30 Apr 2019 17:13:34 GMT
etag: "98013599e6f108a0edeeaac7c8b2bb45"
expires: Tue, 30 Apr 2019 18:13:34 GMT
last-modified: Mon, 08 Apr 2019 17:59:58 GMT
server: UploadServer
status: 200
x-goog-generation: 1554746398034230
x-goog-hash: crc32c=TKSAfA==, md5=mAE1mebxCKDt7qrHyLK7RQ==
x-goog-meta-firebasestoragedownloadtokens: da578546-c265-4f06-ae11-6273a7812bf2
x-goog-metageneration: 2
x-goog-storage-class: STANDARD
x-goog-stored-content-encoding: identity
x-goog-stored-content-length: 3162637
x-guploader-uploadid: AEnB2UqdvgzkJMC0yHJkGbr-K5cWWbXK5I2j6NLtd4NwG1G9swIhhp1QC8G25JUK4LItZID0IxuYhhLta3YImMTtzbKkr5vcEQ
I reached out to Firebase Support and here is the answer I got:
This is classic Google.
You can upload the images to the Storage, but you can't serve them and it's not a CDN.
Great.