简体   繁体   English

负载平衡和Web图像/缩略图/缩略图

[英]Load Balancing and Web Images /Thumbimages/Thumbnails

We are planning to introduce Load balancing in our server environment. 我们计划在服务器环境中引入负载平衡。 Our site has lots of thumbnails (Thumbimages) to get displayed on the website. 我们的网站上有很多缩略图(Thumbimages)要显示在网站上。 As all the images should be there under Web directory to get displayed on web site, do I need to maintain these TNs in all the servers? 由于所有图像都应该位于Web目录下才能显示在网站上,因此我是否需要在所有服务器中维护这些TN?

Is there any other way to accomplish this? 还有其他方法可以做到这一点吗?

Yes, put the images on all the servers. 是的,将映像放在所有服务器上。 That's the best way of load balancing because it requires less logic to be performed by the load balancer (ie no packet inspection) so is fast. 这是最好的负载平衡方式,因为它要求负载平衡器执行较少的逻辑(即无需进行数据包检查),因此速度很快。 Use rsync or similar to keep the images in sync on all nodes. 使用rsync或类似命令可使图像在所有节点上保持同步。

Just create a central network share for the images. 只需为图像创建一个中央网络共享。 Then point all the web servers to that network shared images folder. 然后将所有Web服务器指向该网络共享映像文件夹。 The load balancer is just directing the page request to a web server which then loads the images from a network shared folder. 负载平衡器只是将页面请求定向到Web服务器,然后Web服务器从网络共享文件夹中加载图像。 So my conclusion is that there is no load balancing logic required for images? 因此,我的结论是图像不需要负载平衡逻辑吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM