如何平衡Web服务器带宽使用情况? [英] How to balance webserver bandwith usage?

查看:132
本文介绍了如何平衡Web服务器带宽使用情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个drupal Commerce网站,用户一直在其中上传大量图像.每个商务订单都有n张图片.

I have a drupal commerce website in which users upload a lot of images all the time. Each commerce order has n images.

我想平衡网络流量以节省带宽(每台服务器的带宽是有限的).我不能使用传统的负载平衡解决方案,因为平衡器服务器的带宽也将有限.我的数据库将位于单独的服务器上.

I would like balance network traffic in order to save bandwidth (bandwidth is limited for each server). I cannot use a conventional load balancing solution because the balancer server also will have a limited bandwidth. My database will be on the separated server.

我想在每个服务器中直接找到处理请求的解决方案,并按会话保持连接,以便将所有用户的上载都保存在同一服务器上,我认为DNS循环平衡不是一个好的解决方案,因为请求将在任何服务器上接收,并且所有文件都将不相同.

I would like to find a solution for handle request directly in each server and persist the connections by session in order to get all user's uploads on the same server, I think DNS round robin balancing isn't a good solution because the requests will be received in any server and all the files will not be at the same.

我曾经以为我可以为每个服务器放置一个子域,然后从我的主要drupal实例重定向到另一台服务器,然后将收到该服务器的所有后续请求...但是我不确定这是一个好的解决方案..我不知道是否可行和可行.

I had thought that I can put one subdomain for each server and redirect from my main drupal instance to another server, then all subsequent requests will be received for this server... but I'm not secure it is a good solution.. and I don't know if is possible and practical.

有人可以建议我替代吗?

Can anyone suggest me an alternative?

我的网站在PHP 5.x上运行

My site runs on PHP 5.x

推荐答案

对不起,我的英语不好.为了让您更好地了解图片

Excuse me for my weak English. To give you a better understanding of the picture

创建子域不是一个好的解决方案.因为它使用相同域的带宽.

Making a Sub-domain is not a good solution. Because it uses the bandwidth of the same domain.

如此

此解决方案在主站点上的带宽消耗最少

您可以使用Ajax技术上传到多台服务器或多台服务器(具有无限带宽) 在这些服务器中,存储图像后,使用API​​(REST或SOAP)将URL存储在原始服务器中,或者从(Web服务器)获取注册号. (图像) 这种方法会为原始服务器创建非常小的数量,并且您的图像将从其他服务器上显示出来,以显示在网站上.

You can use Ajax technology to upload to multiple servers or servers (with unlimited bandwidth) And in those servers, after storing the image, use the API (REST or SOAP) to store the URL in the original server or get the registered number from (Web server). (image ) This method creates a very small amount for the original server and your images will be displayed from another server for display on the website.

或使用其他解决方案:图片

or use other solution : image

请看图片

这篇关于如何平衡Web服务器带宽使用情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆