I am stuck at this problem for two days.
I have added 4 blob storage origins in a single origin group at azure front door. I am doing hit and trial on blob sas tokens.
I have not updated any settings like weights and prioity, health probes are enabled.
Please tell me what i am doing wrong.
async uploadFile(file: File, link: string, tokens: { token: string, accountName: string }[], container: string) {
const fileName = `${file.name}-${Date.now()}`;
let response = null
for (let token of tokens) {
try {
console.log(token)
const blobServiceClient = new BlobServiceClient(`${link}?${token.token}`);
const containerClient = blobServiceClient.getContainerClient(container)
const blockBlobClient = containerClient.getBlockBlobClient(fileName);
const responseBlob = await this.upload(file, blockBlobClient)
if (responseBlob.errorCode) {
continue;
}
response = {responseBlob,accountName:token.accountName};
return response
} catch
(e) {
console.log(e);
continue;
}
}
return {response,fileName}
}
Expectation:
Upload file to the best and nearest origin to the end user.
Result:
Front door ALWAYS uploads file to the LATEST added storage account or the last one.
New contributor
Sufian Majid is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.