Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 9-Feb-17 23:56pm
v2

1 solution

Quote:
will that user get the latest files or updates?hope you all will get my point?
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.
 
Share this answer
 
v2
Comments
Sajid227 10-Feb-17 6:22am    
very briefly,I got your point.its mean without using caching we are able to upload files etc ,and that will be accessible to all user of all instances right after that. We are going to use MS Azure as well.and what if we use cache?
Afzaal Ahmad Zeeshan 10-Feb-17 8:18am    
Yes, that is because every user will be redirected towards the current instance and they will get the fresh copy of application; caching stores the older application files, such as HTML or CSS files which requires a hard reload (removing caching), to get the fresh application.

In that case, share with me what sort of application is this (web application, Web API, backend service, virtual machine, what?) so that I can guide you in depth on this case.
Sajid227 12-Feb-17 22:56pm    
this is basically web application,but at same time it is integrate with web services,to fetch and to serve data to to other applications,although I am very much clear about my question.but you let me know some tips that help me to design my plan of deployment that application,before moving to cloud.
Afzaal Ahmad Zeeshan 13-Feb-17 4:46am    
Ah, then the application already seems to be in a good stream of processing. :-)

For deployment designs:
1) Make sure you have deployment slots active, and that fresh code is pushed to that slot, instead of production one. Due to this, each time your application will be started before it is allowed for consumption; removes any downtime.
2) Consider using load balancers, other than those provided, to achieve even a better solution.
3) Although not necessary, but using different data centers would increase the performance of your application as well.
4) Caching can be done, but for static content; such as about me pages, or static JavaScript files. Azure also provides CDN services.

Other than that, I believe you will not face issues.
Sajid227 13-Feb-17 5:15am    
A bundle of thank ,and pardon me having this lengthy chit chat....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900