我們正在為我們的網絡應用添加一項功能,其中上傳文件(到應用服務器)由后臺工作人員(其他機器)處理.
docker nfs。應用程序的性質意味著這些文件會持續一段時間.在worker上執行的代碼知道文件何時變得無關緊要,并且應該在那時刪除該文件.
我的直覺是要求我們的系統管理員使用NFS設置共享文件夾.任何Web服務器都可以將文件保存到NFS中,任何工作人員都可以將其提取出來進行處理.信號與信號編排工作通過共享Redis實例中的數據進行.
關于NFS,有人告訴我:
Typically,for this kind of use case,we route all upload requests to
a single web server. The server that handles uploads will write the
files to a directory,say /data/shared/uploads which is then
synchronized in a read-only fashion to all other servers.
聽起來他們不喜歡NFS.我問問題是什么.有人告訴我:
In regards to NFS or any other shared file system,the problem is
always the same – it introduces a single point of failure. Not only
that,it also tightly couples all servers together. Problems with one
server can affect the others,which defeats the purpose of load
balancing and de-coupling.
我們目前處于多個Web服務器和工作者的規模,但仍然是單個DB和Redis實例.因此,我們已經存在與我們緊密耦合的單點故障.
NFS是否有問題以至于上述參數有效?
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态