简体   繁体   English

使用IP地址访问Amazon S3资源

[英]Accessing Amazon S3 resources using IP address

I found out Amazon S3 give me different IP address when I tried to access the same resources. 当我尝试访问相同资源时,我发现Amazon S3为我提供了不同的IP地址。 13.111.11.11 and 13.222.11.11. 13.111.11.11和13.222.11.11。 Do they point to the same server location or do they point to different server location. 它们指向相同的服务器位置还是指向不同的服务器位置。 If a file get updated, does accessing it on the two different IP make a difference in terms if we want to get it first? 如果文件得到更新,那么如果我们要首先获取文件,在两个不同的IP上进行访问是否会有所不同?

You should always access Amazon S3 by using the provided DNS name (eg my-bucket.s3-us-west-2.amazonaws.com ). 您应该始终使用提供的DNS名称(例如, my-bucket.s3-us-west-2.amazonaws.com )访问Amazon S3。

There are many, many servers powering Amazon S3 so you should never cache nor use a particular IP address. 有许多服务器为Amazon S3提供支持,因此您永远不应缓存或使用特定IP地址。 Also, if you are using a DNS name that resolves to a particular bucket (like the example above), S3 requires the domain name to know which bucket to access (since an IP address alone is insufficient). 另外,如果您使用的DNS名称解析为特定的存储桶(如上述示例),则S3要求域名知道要访问哪个存储桶(因为仅IP地址是不够的)。

The Amazon S3 Data Consistency Model says: Amazon S3数据一致性模型说:

Amazon S3 provides read-after-write consistency for PUTS of new objects in your S3 bucket in all regions ... Amazon S3 offers eventual consistency for overwrite PUTS and DELETES in all regions. Amazon S3为所有区域中的S3存储桶中的新对象的PUTS提供写入后读取一致性。AmazonS3最终为所有区域中的PUTS和DELETES覆盖提供一致性。

So, new files will always return the file, but updates might be subject to a short delay as the change is propagated between servers. 因此,新文件将始终返回文件,但是由于更改会在服务器之间传播,因此更新可能会短暂延迟。

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

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