一个网站内容的多个文件服务器

发布于 2024-09-10 17:20:42 字数 107 浏览 1 评论 0原文

我计划使用多个文件服务器来托管我的网站上传的文件。最好的方法是什么?我应该在其他机器上安装网络服务器吗?或者有什么特殊的软件可以在网络上路由文件?你专业人士会做什么?

谢谢, 塔赫尔。

I'm planning to use multiple file servers to host my website uploaded files. what's the best way to do it ? should I install a web server on other machines as well? or is there any special software for routing files on the network? what would you pros do?

Thanks,
Taher.

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

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

发布评论

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

评论(2

空宴 2024-09-17 17:20:42

这是您可以做到的一种方法...

创建一个中央路由处理程序,专门用于从网络上抓取文件,并将您的文件服务器命名为指向您的各种文件服务器的子域。

当用户单击下载链接时,例如

www.example.com/GetDownload.php?id=10

...GetDownload.php 页面将在数据库中查找文件的存储位置(假设您正在跟踪数据库中的文件位置)或通过您的惯例来跟踪上传,然后确定文件在网络上的位置。然后它可以简单地将 URL 重定向到适当的服务器/下载文件夹。因此,GetDownload.php?id=10,找到文件位置后将重定向到适当的服务器/URL:

AFile.doc 位于 FileServerB 上,重定向...

FileServerA.Example.com

这里! --> FileServerB.Example.com/A/AFile.doc

FileServerC.Example.com

Here's one way you could do it...

Create a central routing handler specifically for grabbing files off the network and have your file servers named as sub domains pointing to your various file servers.

When a user clicks on the download link, e.g.

www.example.com/GetDownload.php?id=10

...the GetDownload.php page would look in the database to see where the file has been stored (assuming you're keeping track of the files locations in the database) or through whatever your convention is for keeping track of uploads, then determine the location of the file on your network. Then it could simply redirect the URL to the appropriate server/download folder. So GetDownload.php?id=10, upon finding the location of the file would redirect to the appropriate Server/URL:

AFile.doc is on FileServerB, redirect...

FileServerA.Example.com

Here! --> FileServerB.Example.com/A/AFile.doc

FileServerC.Example.com

殤城〤 2024-09-17 17:20:42

您还可以配置 gluster 并将您的 glusterfs 安装在网络服务器上......您还将拥有一个容错系统。

You can also configure gluster and mount your glusterfs on the webserver ... You will aslo have a fault tolerant system.

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