Click here to Skip to main content
15,885,066 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
What is difference between stateless and stateful virtual machines in azure?
Posted

1 solution

HTTP is a stateless protocol, which means, server doesn't have to maintain and save the activity of the connection between itself and the client. As soon as the document (HTML document, of course) is downloaded the connection is terminated and for next resource, client has to re-establish the connection and re-download the document as if it were his first time (because activity is not saved!). This means, that if the user logs in, server doesn't know. Sessions, caches, cookies are used to overcome this problem. So that each time I log in to CodeProject, website would check for a cookie, cache and other session variables (if they had any) to provide me with data that is meant for me.

Stateful protocols, would maintain the connection and activity of that user for a longer time so that server-to-client communication can be possible, also, since they maintain the state, they know that the user is downloading the page second time so server itself can manage the content without having to wait for cookie or cache check.

In simple version, if the user activity is lost (or unknown) before each request Stateless, while if the user activity is known, or previous data is known then protocol is Stateful.

Just for the sake of example: A plain-ASP.NET website would be stateless, while an application having SignalR installed would mimic the properties of stateful application; although it is still stateless based on HTTP protocol.

asp.net mvc - What's the difference between stateful and stateless? - Programmers Stack Exchange[^]
Stateless protocol - Wikipedia, the free encyclopedia[^]

Now, just apply this concept to those virtual machines in Azure and you will understand the purpose of these terminologies. The machines that start as if it were their first time, would be stateless.

How to Make a Stateless Image for Virtual Machines in a Virtual Desktop Pool - Remote Desktop Services (Terminal Services) Team Blog - Site Home - MSDN Blogs[^]
 
Share this answer
 
v2

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