Scaling and troubleshooting Web Apps

Azure App Services

Florin Angelescu

Azure Cloud Architect

Why scaling matters

 

Scale Up

 

Scale Out

  • Scaling up
    • More resources (CPU, memory, etc.)
  • Scaling out
    • More instances
Azure App Services

Manual vs. automatic scaling

 

Manual Scaling

 

Automatic Scaling

  • Manual scaling
    • Control the number of instances directly
  • Auto-scale
    • Adjusts resources automatically
    • Based on rules you define
Azure App Services

Configuring auto-scale rules

 

Auto Scaling

  • Add an instance if CPU usage stays above 70% for 10 minutes
  • Set limits to avoid provisioning too many instances
Azure App Services

Monitoring your Web App

Monitoring

  • Monitoring:
    • Helps detect issues early
    • Supports informed decisions
  • Azure provides built-in metrics such as:
    • Response time
    • Request rates
    • Error counts
  • Metrics can be viewed in real time
  • Basic metrics offer good insights
  • Deeper analysis is needed for effective troubleshooting
Azure App Services

What is Application Insights?

Application Insights

Azure App Services

Enabling Application Insights

 

Enable Application Insights

 

  • Enable Application Insights
    • Directly in Azure Portal
  • Collects data automatically
    • No need for code changes
Azure App Services

Troubleshooting example

Application Insights Example

  • Use Application Insights to check the "Performance" tab
    • Response times increase sharply during those hours
  • Look at "Dependencies"
    • A database call is taking too long
  • Optimize the database query
    • Improves your application speed
Azure App Services

Summary

 

Scale Out

Scale Up

App Insights

 

  • Scale out
    • Add more instances to handle increased load
  • Scale up
    • Increase compute resources for faster performance
  • Monitor
    • Track performance and troubleshoot issues
Azure App Services

Let's practice!

Azure App Services

Preparing Video For Download...