简体   繁体   English

使用AWS S3减少最短上传时间?

[英]Decreasing minimum upload time with AWS S3?

I'm building an android app that needs to send small files between clients (about 15kb on average). 我正在构建一个需要在客户端之间发送小文件的Android应用(平均大约15kb)。 The client are already communicating via websocket. 客户端已经通过websocket通信。 My current solution is to upload the file to S3 and use the websocket to notify everyone that there's a new file to download. 我当前的解决方案是将文件上传到S3,并使用websocket通知所有人,有一个新文件要下载。 I'm uploading the file with AmazonS3Client.PutObject() . 我正在使用AmazonS3Client.PutObject()上传文件。

However, I noticed a few seconds of delay, that I'd like to avoid. 但是,我注意到有几秒钟的延迟,这是我想避免的。 No matter how small the file, it always takes at least 2 seconds to upload. 无论文件有多小,上载总是至少需要2秒。 I would like to decrease this time if possible. 如果可以的话,我想减少这个时间。 I'm also open to alternative solutions, but it's important that I can have one-to-many transfer of the files. 我也欢迎其他解决方案,但重要的是我可以进行文件的一对多传输。

This is called latency. 这称为等待时间。 There's two measures of speed in networking- throughput (the amount of data you can transfer per second) and latency (how long it takes to send any data at all). 有两种速度可衡量网络速度-吞吐量(每秒可传输的数据量)和延迟(完全发送任何数据需要多长时间)。 Latency is because it takes time to send a message from your phone to the cell tower, from there to the internet, from the internet to AWS, and from AWS to the specific server dealing with your storage. 延迟是因为将消息从您的手机发送到蜂窝塔,再从那里发送到Internet,从Internet到AWS,再从AWS到处理您的存储的特定服务器都需要花费时间。 Its mostly a factor of the networking technology and the physical distance between source and destination. 它主要是网络技术和源与目标之间的物理距离的一个因素。 There's really not much you can do about it. 实际上,您对此无能为力。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM