如何在多个实例运行时更新云上的应用程序文件 [英] How to update application files on cloud when multiple instance running

查看:78
本文介绍了如何在多个实例运行时更新云上的应用程序文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们现在正在迁移到云,我们想要解决的查询很少,所以我们将使用缩放来处理我们的流量负载。查询是当我们将我们的应用程序部署到Web服务器时,稍后我们要更新一些文件或资源,让我们在下午3点,由于流量负载,我指向我的应用程序的4个实例中的实例1,如果我在这里更新文件,以及当负载较低时,用户通过负载均衡器点击实例3,该用户是否会获得最新文件或更新?希望你们都能得到我的观点吗?



我尝试过的事情:



i已经诽谤但不是我发现的令人满意的解释,请参考一些链接等

We are moving to cloud now,there are few queries we want to solve so that ,we will use scaling to handle our traffic Load. Query is that when we deploy our application to web server ,later we want to update some files or resources, let at 3pm ,due to Traffic load I am directing to instance 1 out of 4 instance of my application,if i update files here ,and later time when load is low,user hit to instance 3 by load balancer,will that user get the latest files or updates?hope you all will get my point?

What I have tried:

i have goolged but not a satisfactory explanation i found,please refer some links etc

推荐答案

引用:

该用户是否会获得最新的文件或更新?希望大家都能得到我的观点?

will that user get the latest files or updates?hope you all will get my point?

是的,除非您使用缓存内容的缓存或CDN网关,否则他将获取最新文件。如果您不使用缓存服务,CDN或类似技术,那么用户将始终获得新鲜内容。此外,在云端,您应该为您的用户提供新鲜的内容和新鲜的文件; 云服务不是免费的,如果您要付费,请多付一点以获得最大输出



负载均衡服务器管理流量并将它们引导到后端的虚拟机,这个后端就是处理的内容。如果您希望您的用户始终获得新鲜内容,请不要实施缓存(我是否认真地说过这个?),但同样地说您知道流量时间(下午3点流量较低)等等,你可以在流量高且频繁的时候实施低缓存策略。



此外,在这种情况下,我只是将数据保留在虚拟机之外并从那里加载数据,以便从读取中抽象出所有4个虚拟机/写入磁盘上的操作,并请求数据存储提供程序传递数据;现在,在这个场景中,您可以让数据提供者为您缓存存储文件



BTW,您使用的是哪个云提供商?这些概念中的大多数适用于Microsoft Azure,我个人已针对其服务进行了测试,但其他提供商应为您提供类似的架构设计。



例如,Azure已经在其应用服务中具有此功能,可确保您的应用程序实现零停机时间,在Azure App Service中为Web应用程序设置登台环境Microsoft Docs [ ^ ]。因此,用户总是获得最新版本的应用程序,Azure自行管理负载平衡。

Yes, he will get the latest file unless you are using some caching or CDN gateways, which cache the content. If you are not using caching services, or CDNs, or similar techniques, then users will always get the fresh content. Besides, on cloud you should provide your users with fresh content and fresh files; cloud services are not free, and if you are going to pay, pay a bit more to get maximum output.

Load balancing servers manage the traffic and direct them to virtual machines at the backend, and this backend is what does the processing. If you want your users to always get the fresh content, do not implement caching at all (did I seriously say this?), but likewise you say that you know the traffic timings (3 PM has low traffic etc. in your post), then you can implement low caching policies for times when traffic is high and frequent.

Also, in this scenario, I would just keep the data outside the virtual machines and load the data from there so that all 4 of the virtual machines are abstracted from read/write operations on the disk, and they request data storage providers to deliver the data; now, in this scene you can have data provider cache the storage files for you.

BTW, which cloud provider are you using? Most of these concepts apply to Microsoft Azure and I personally have tested it against their services, but other providers should provide you with a similar architectural design.

For example, Azure already has this feature in their App Services that guarantee zero-downtime in your applications, Set up staging environments for web apps in Azure App Service | Microsoft Docs[^]. So users always get latest version of application, Azure manages the load balancing itself.


这篇关于如何在多个实例运行时更新云上的应用程序文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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