As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
Initially I've started uploading files into Kinveys backend environment using REST API. That always took me several seconds. I thought the problem might be caused by my backend server (doing the upload).
Now using your HTML5 API (3.1.2) I experience the same performance problem. The central upload operation is:
var promise = Kinvey.Files.upload(fileContent, metaData)
.then(function (file) {...
I have done some tests with a 5KB png file. I live in middle of Europe and use a 150MMBit Internet connection (50MBit upload). Further more I've tested on different browsers: Firefox, Chrome, Safari (all latest versions).
If you have a look at the attached screenshot (browser network output):
As you can see it takes several seconds (twice) for www.googleapis.com that probably is invoked by the HTML5 Kinvey API. Based on different tests those calls take 2-8 seconds. The fourth one in the list is string upload into a collection which is always fast).
So my questions are: Do you (at Kinvey) experience the same time (several seconds) on uploading a very small file? Is this normal or are there options I can improve upload speed?
The funny thing: Having the Kinvey console opened in a separate tab I see the upload file there "right away" after upload start but it still takes several seconds the callback (.then(...) tells me the file was successfully uploaded.
Regards
Best Answer
M
Martin Apostolov
said
almost 5 years ago
Hi Tayger,
The relative slow upload to Google Cloud Storage is normal due to GCS's fixed latency cost per request that’s related to ensuring that the files are replicated and uploaded properly. So the actual upload of the file is a small portion compared to this fixed latency cost. That is why uploading a small file and a larger file can be similar in time.
As for the file appearing in the Kinvey console before you get the callback - the upload of the file is done in two steps - first the file metadata is saved in Kinvey and then the file itself is uploaded in GCS - the file metadata request to Kinvey is quite fast so that is why you see the file appear in Kinvey console, while the callback waits for the file to be uploaded to GCS before returning a response.
Yes, that helped, thank you! The process "behind the scene" is now clearer to me. I was guessing something like that since I see uploaded files/data very quickly. That confirms me as well that I'm not doing wrong anything. I used a small file to make sure the file size is not the problem but I'm a ware there is a lot more in the background than "just" a file will be uploaded.
Regards
Martin Apostolov
said
almost 5 years ago
Answer
Hi Tayger,
The relative slow upload to Google Cloud Storage is normal due to GCS's fixed latency cost per request that’s related to ensuring that the files are replicated and uploaded properly. So the actual upload of the file is a small portion compared to this fixed latency cost. That is why uploading a small file and a larger file can be similar in time.
As for the file appearing in the Kinvey console before you get the callback - the upload of the file is done in two steps - first the file metadata is saved in Kinvey and then the file itself is uploaded in GCS - the file metadata request to Kinvey is quite fast so that is why you see the file appear in Kinvey console, while the callback waits for the file to be uploaded to GCS before returning a response.
Tayger
Hello
Initially I've started uploading files into Kinveys backend environment using REST API. That always took me several seconds. I thought the problem might be caused by my backend server (doing the upload).
Now using your HTML5 API (3.1.2) I experience the same performance problem. The central upload operation is:
I have done some tests with a 5KB png file. I live in middle of Europe and use a 150MMBit Internet connection (50MBit upload). Further more I've tested on different browsers: Firefox, Chrome, Safari (all latest versions).
If you have a look at the attached screenshot (browser network output):
As you can see it takes several seconds (twice) for www.googleapis.com that probably is invoked by the HTML5 Kinvey API. Based on different tests those calls take 2-8 seconds. The fourth one in the list is string upload into a collection which is always fast).
So my questions are: Do you (at Kinvey) experience the same time (several seconds) on uploading a very small file? Is this normal or are there options I can improve upload speed?
The funny thing: Having the Kinvey console opened in a separate tab I see the upload file there "right away" after upload start but it still takes several seconds the callback (.then(...) tells me the file was successfully uploaded.
Regards
Hi Tayger,
The relative slow upload to Google Cloud Storage is normal due to GCS's fixed latency cost per request that’s related to ensuring that the files are replicated and uploaded properly. So the actual upload of the file is a small portion compared to this fixed latency cost. That is why uploading a small file and a larger file can be similar in time.
As for the file appearing in the Kinvey console before you get the callback - the upload of the file is done in two steps - first the file metadata is saved in Kinvey and then the file itself is uploaded in GCS - the file metadata request to Kinvey is quite fast so that is why you see the file appear in Kinvey console, while the callback waits for the file to be uploaded to GCS before returning a response.
Let me know if this has helped.
- Oldest First
- Popular
- Newest First
Sorted by Newest FirstTayger
Hi Martin
Yes, that helped, thank you! The process "behind the scene" is now clearer to me. I was guessing something like that since I see uploaded files/data very quickly. That confirms me as well that I'm not doing wrong anything. I used a small file to make sure the file size is not the problem but I'm a ware there is a lot more in the background than "just" a file will be uploaded.
Regards
Martin Apostolov
Hi Tayger,
The relative slow upload to Google Cloud Storage is normal due to GCS's fixed latency cost per request that’s related to ensuring that the files are replicated and uploaded properly. So the actual upload of the file is a small portion compared to this fixed latency cost. That is why uploading a small file and a larger file can be similar in time.
As for the file appearing in the Kinvey console before you get the callback - the upload of the file is done in two steps - first the file metadata is saved in Kinvey and then the file itself is uploaded in GCS - the file metadata request to Kinvey is quite fast so that is why you see the file appear in Kinvey console, while the callback waits for the file to be uploaded to GCS before returning a response.
Let me know if this has helped.
-
How do I use Kinvey in my web app?
-
Is it safe to include keys/secrets in my client-side JavaScript app?
-
Why is the activeUser null even though I am logged in?
-
Login does not work even though credentials are valid.
-
Social login doesn’t work.
-
Appending objects to an Array (HTML5 - JS)
-
New to node.js - need bootstrap to downloadfiles from Kinvey
-
Problem with Aggregation/Grouping
-
Internal Server Error using Twitter Sign Up
-
Data Store
See all 315 topics