建立一个社区摄影网站,我在哪里可以在线存储我的照片?

发布于 2024-08-07 12:17:34 字数 1539 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

╰沐子 2024-08-14 12:17:34

我曾经在一家托管数十亿张图像的社交网站工作,我们评估了 S3。结论是对于流量大的站点来说太昂贵了。存储本身相当便宜,但访问 S3 上的内容的成本会迅速增加。这使得 S3 更适合在线备份等应用程序。在我看来,成本是主要的缺点。

另一方面,只有当您的网站变大时,这才是一个问题。 S3 的最大优点是您不必担心可扩展性,而且它很容易设置,然后就可以忘记它,因为它就可以工作。许多中型服务使用 S3 并取得了巨大成功。

我们寻求的解决方案是一系列专用服务器,它们托管图像并运行网络服务器(不要使用 Apache,使用针对静态内容优化的网络服务器,例如 lighttpd 或 nginx),并在这些服务器前面使用 CDN(内容配送网络,例如 akamai 或 pantherexpress)。您通常会获得很高的命中率(取决于您网站的访问模式),因此最终用户将直接从 CDN 获取大多数文件,并且不会对您的服务器造成任何负载(除了第一次访问文件) 。因此,您可能暂时只使用一台服务器和一个镜像就可以了。随着规模的扩大,挑战变成了如何在整个农场中分发图像、如何管理冗余等。

我认为上市时间也发挥了作用。在这方面,一个好的策略可能是从 S3 开始并快速启动和运行。稍后您仍然可以迁移到更复杂的解决方案。在这种情况下,请确保管理层牢记这一点。非技术人员倾向于相信,一旦某项功能发挥作用,您就再也不用碰它了。请注意,迁移大量数据需要时间。当我们改变照片架构时,复印工作运行了几个月。

I used to work for a social networking website that hosts billions of images and we evaluated S3. Conclusion was that it is too expensive for heavy-traffic sites. The storage itself is pretty cheap, but the costs for accessing the content on S3 add up quickly. That makes S3 more suitable for applications like online backups. In my view, cost is the main con.

On the other hand, this is only a concern once your site gets large. The biggest advantages of S3 are that you don't have to worry about scalability and that it's pretty easy to set up and then forget about it because it just works. Many medium sized services use S3 with great success.

The solution we went for is an array of dedicated servers that host the images and also run webservers (don't use Apache, use webservers optimized for static content such as lighttpd or nginx), and in front of those, use a CDN (content delivery network, such as akamai or panther express). You will typically get high hit rates (depending on the access patterns of your site), so the end users will get most files directly out of the CDN and not cause any load on your servers (except for the first time a file is accessed). Thus you might be fine with just one server and a mirror for a while. As you scale, the challenges become how to distribute your images across the farm, how to manage redundancy etc.

I assume that time-to-market also plays a role. In that respect, a good strategy might be to start with S3 and be up-and-running quickly. Later on you can still migrate to a more sophisticated solution. In that case, make sure management keeps this in mind. Non-tech people tend to believe once a functionality works, you never have to touch it again. And be aware that migrating a lot of data takes time. When we changed our photo architecture, the copy jobs ran for months.

初雪 2024-08-14 12:17:34

Flickr/Picasa 集成怎么样?用户使用自己的 Flickr/Picasa 帐户来存储照片并使用您网站中的功能。在这种情况下,您无需为存储照片付费:P

我自己想要一个单一的照片存储配件。而不是拥有个人账户。对于每个站点。

How about a Flickr/Picasa integration? The users use their own Flickr/Picasa account to store their photo and use the features in your site. In that case you pay for nothing for storing photo :P

I myself would like to have a single photo storing acc. instead of having individual acc. for each site.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文