This repository has been archived by the owner. It is now read-only.

getSas - PUT block context => decrease server calls to optimize upload flow #2052

Open
coronag opened this Issue Sep 28, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@coronag
Copy link

coronag commented Sep 28, 2018

Type of issue

  • Bug report
  • Feature request

Uploader type

  • Traditional
  • S3
  • Azure
GetSasKey => cache storage to avoid asking for a new sas key if the last one is still valid for a long time [...]

If a sas key has a lifetime of 5 minutes and the last request was made 2 seconds before... it is not required to request a new one. It is more important with concurrent calls (many calls for a same sas key).

We use 4MB chunks and concurrent is enabled. 4Mb is a good compromise for bad connections and concurrent helps good connections.
Before each PUT request, a call is made to get a fresh SaS key. Our SasKey duration is 5 minutes.
Client may avoid requesting the server for a fresh SasKey during for instance 1 minute.
Why : this avoid for a very good connection to got many getSasKey request while the SasKey is still valid.
Why not much more than 1 minute : for bad connections to avoid having an invalid saskey for a given block blob.

Possible evolutions:

  • an option to specify a sasKeyStorage : if not set, still as actually and if one is given then fineupload will try to use it first before sending a request
  • not as good as the first one, because not good with all browsers : an option to avoid adding "timestamp" (withcacheburst method) so that the server can set an http cache respone to 1 minute for instance (browser cache).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.