AZ-204 Develop Azure compute solutions Practice Question
Which TWO actions should you take to ensure high availability for a stateful ASP.NET application deployed on Azure App Service?
⚠ Common exam trap
It's easy for candidates to confuse scaling up (Option B) with high availability, not realizing that scaling up only adds resources to a single instance, whereas high availability requires redundancy across instances or regions.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Enable ARR Affinity (client affinity) to maintain session state.
Enabling ARR Affinity (client affinity) ensures that all requests from a given client session are routed to the same instance, preserving in-memory session state. Without this, a stateful ASP.NET application would lose session data if subsequent requests are load-balanced to different instances, causing session state errors.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Enable ARR Affinity (client affinity) to maintain session state.
Why this is correct
Enabling ARR Affinity, also known as client affinity, ensures that all subsequent requests from a specific client are routed to the same App Service instance that handled the initial request. This mechanism is crucial for maintaining in-memory session state, preventing data loss or inconsistent user experiences if the application relies on server-side session variables. While it doesn't provide redundancy for the session state itself, it guarantees session stickiness, which is vital for the functional continuity of stateful applications within a scaled-out environment. It helps prevent session-related errors that could otherwise impact perceived availability.
- ✗
Scale up the App Service plan to a higher tier.
Why it's wrong here
Scaling up an App Service plan involves increasing the computational resources of the single underlying virtual machine hosting your application, such as CPU, memory, and disk space. While this can improve performance and capacity for a single instance, it does not enhance high availability. A scaled-up instance remains a single point of failure; if that specific VM or its underlying infrastructure experiences an outage, the application becomes unavailable, as there is no redundant instance to take over. High availability fundamentally requires redundancy, not just more powerful individual components.
- ✓
Deploy the application to multiple regions and use Traffic Manager.
Why this is correct
Deploying the application to multiple Azure regions and utilizing Azure Traffic Manager is a robust strategy for achieving geographical high availability. Traffic Manager acts as a DNS-based load balancer, routing user requests to the healthiest endpoint across different regions based on configured routing methods (e.g., Priority, Performance, Geographic). In the event of a regional outage, Traffic Manager automatically detects the failure and redirects traffic to a healthy, secondary region, ensuring continuous service availability and disaster recovery capabilities. This provides true redundancy against widespread regional failures.
- ✗
Store session state in Azure Files share.
Why it's wrong here
Storing session state directly in an Azure Files share is not a suitable or recommended strategy for high availability. Azure Files is primarily designed for general-purpose file sharing and persistent storage, not for the low-latency, high-throughput, and concurrent access patterns required by application session state. Using it for session state would likely introduce significant performance bottlenecks, latency issues, and potential data corruption due to locking conflicts, ultimately hindering application responsiveness and reliability rather than enhancing availability. Dedicated distributed caches like Azure Cache for Redis are designed for this purpose.
- ✗
Disable session state to allow any instance to handle requests.
Why it's wrong here
Disabling session state fundamentally alters an application's architecture by making it stateless, meaning no user-specific data is stored on the server between requests. While stateless applications are inherently easier to scale horizontally and distribute across instances, this action is only viable if the application is designed to be stateless or can be refactored to store state externally. For applications that genuinely require session state (e.g., shopping carts, user authentication flows), disabling it would break core functionality, rendering the application unusable rather than highly available. It's a design choice, not a universal HA solution.
Go deeper
Related to this question
About these practice questions
One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.