4 ms·
But won't the total time of transfer be higher if there is an additional hop? I understand that the time before being able to confirm the transfer to the user i
by giovannibajo1 13y ago
But won't the total time of transfer be higher if there is an additional hop? I understand that the time before being able to confirm the transfer to the user is slower, but then the photo wouldn't be immediately available to the user (it still needs to go from CF to S3). How is that useful?
- mslot 13y agoCF can keep connections to the origin open, which saves several long round-trip times in TCP/SSL handshakes. Conceivably, the CF-to-S3 network might also be better than the you-to-S3 network.
- giovannibajo1 13y agoI guess latency in connection setup isn't really important when transferring high quality pictures, the bandwidth is going to affect the transfer time much more. I see your point about a better connection between S3 and CF, but it's a hypothesis, and the docs don't confirm it. My experience with CF is that the first fetch (for GETs) tends to be "slow"; I don't have enough numbers to check whether is as slow as S3 (whose speed is highly variant over time) or not. But I have always thought that the speed of S3 was impacted by "I/O" (virtual I/O) time, not network or bandwidth. EC2 servers which are in the same region are able to sustain much higher transfer rates.
- recuter 13y agoI think now it would be: iPhone <----> Closest CloudFront Edge Server <-----> S3 The upload to the edge CF server could be ACK'd faster and at this point the user still has a copy and so does the edge server. If meanwhile he sends somebody a link to this photo, if they are nearby, they'll hit the same edge server and get it faster not slower. If on the other hand they are far away they'll hit a different edge server that would have to grab it in turn from S3 but that would have happened anyway, no? As far as I understand it. Also a trick that helps propagate things to CF edges faster just occurred to me: S3 can be setup to POST somewhere after every write. So maybe.. iPhone <----> Closest CloudFront Edge Server <-----> S3 ----> Central service (App Engine? :P ) ---> Cloudfront Edge{1,2,3..} <---> S3. But that might be a tad overkill, heh. (Also I'm not sure how you can trick CF to direct to a specific edge without using proxies)
- gfodor 13y agomy app is fire-and-forget for users. they don't actually need to re-download the image. so this is a clear win as it will allow them to get those bytes down the pipe to my backend faster.