如何使用 ASP.Net 集群上传文件夹?

发布于 2024-07-05 16:26:36 字数 182 浏览 9 评论 0原文

我们有一种情况,允许用户上传内容,然后单独进行一些更改,然后根据这些更改提交表单。

这在单服务器、非故障转移环境中工作得很好,但是我们需要某种解决方案来在支持故障转移的服务器之间共享文件。

过去有人遇到过这个吗? 您能够开发出什么样的解决方案? 显然,持久化到数据库是一种选择,但我们宁愿避免这种情况。

We have a situation where users are allowed to upload content, and then separately make some changes, then submit a form based on those changes.

This works fine in a single-server, non-failover environment, however we would like some sort of solution for sharing the files between servers that supports failover.

Has anyone run into this in the past? And what kind of solutions were you able to develop? Obviously persisting to the database is one option, but we'd prefer to avoid that.

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

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

发布评论

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

评论(4

遇见了你 2024-07-12 16:26:37

在我们的场景中,我们有一个单独的文件服务器,两个前端应用程序服务器都写入该文件服务器,这样您的任一服务器都可以访问相同的文件集。

In our scenario, we have a separate file server that both of our front end app servers write to, that way you either server has access to the same sets of files.

笑脸一如从前 2024-07-12 16:26:37

对此的最佳解决方案通常是在某种形式的 SAN 上提供共享区域,所有服务器都可以访问该共享区域并包含故障转移。

这还有一个好处是您不必提供粘性负载平衡,上传可以由一台服务器处理,编辑可以由另一台服务器处理。

The best solution for this is usually to provide the shared area on some form of SAN, which will be accessible from all servers and contain failover.

This also has the benefit that you don't have to provide sticky load balancing, the upload can be handled by one server, and the edit by another.

初见 2024-07-12 16:26:37

具有故障转移功能的共享 SAN 是一个很好的解决方案,但成本很高。 是否有任何类似的以合理成本进行故障转移的解决方案? 也许类似于 Windows 的 DRBD 之类的东西?

简单共享文件系统的问题是缺乏冗余(如果文件服务器出现故障怎么办)?

A shared SAN with failover is a great solution with a great (high) cost. Are there any similar solutions with failover at a reasonable cost? Perhaps something like DRBD for windows?

The problem with a simple shared filesystem is the lack of redundancy (what if the fileserver goes down)?

溺孤伤于心 2024-07-12 16:26:36

在之前的工作中,我们有一个 Web 服务器集群,前面有一个 F5 负载均衡器。 我们有一个非常相似的问题,我们的应用程序允许用户上传可能包括照片等的内容。 这些是遗留应用程序,我们不想编辑它们以使用数据库,而且 SAN 解决方案对于我们的情况来说太昂贵了。

我们最终在两台集群服务器上使用了文件复制服务。 它作为服务在两台计算机上运行,​​使用的帐户可以通过网络访问对方服务器上的路径。 上传文件后,该后端服务会同步文件系统文件夹中的数据,使其可以从任一 Web 服务器提供服务。

我们审查的两个产品是 ViceVersaPeerSync。 我认为我们最终使用了 PeerSync。


At a former job we had a cluster of web servers with an F5 load balancer in front of them. We had a very similar problem in that our applications allowed users to upload content which might include photo's and such. These were legacy applications and we did not want to edit them to use a database and a SAN solution was too expensive for our situation.

We ended up using a file replication service on the two clustered servers. This ran as a service on both machines using an account that had network access to paths on the opposite server. When a file was uploaded, this backend service sync'd the data in the file system folders making it available to be served from either web server.

Two of the products we reviewed were ViceVersa and PeerSync. I think we ended up using PeerSync.


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