Skip to content

Latest commit

 

History

History
42 lines (37 loc) · 1.99 KB

5.4. Developing for autoscaling.md

File metadata and controls

42 lines (37 loc) · 1.99 KB

Developing for autoscaling

  • Applications workloads are unpredictable
    • Overestimate => Pay for unnecessary compute resources
    • Underestimate => Poor user experience
    • Ideally => Use extra instance only when it's needed and shut down when it's not.

Workload Patterns

  • 📝 Four common computing patterns you'll see for web applications in cloud
    • On and Off
      • |||||....|||||......
      • On and of workload | Scaling cloud computing pattern
      • E.g.: batch processing.
    • Growing fast
      • |.||.|||.||||.|||||.||||||
      • Growing fast | Scaling cloud computing pattern
      • Often growing start-ups.
    • Unpredictable bursting
      • |..|..|||||||||..|.|
      • Unpredictable Bursting | Scaling cloud computing pattern
    • Predictable bursting
      • |.|.||||.|.|.||||.|.|
      • Predictable bursting | Scaling cloud computing pattern
      • E.g. during black friday for a e-commerce site.
  • Distribute applications across multiple instances to provide redundancy + performance.
    • A load balancer is needed to distribute.

Auto scale

  • Primary advantage of the cloud is elastic scaling.
    • Ability to use as much capacity as you need, scale out if load increases, scale in when the extra capacity is not needed.
  • Supported in many Azure Services
    • IaaS: Azure Virtual Machine Scale Sets (identical VMs in same set)
    • PaaS: Azure App Service
    • Or event database services such as Cosmos DB
  • Auto-scale metrics
    • Supported in all pricing plans of App Service.
    • Autoscale can be triggered based on metrics or at scheduled date and time.
    • Metrics are aggregated over all instances of the plan
    • E.g. CpuPercentage, MemoryPercentage, BytesRecieved, BytesSent, HttpQueueLength, DiskQueueLength (read+writes queued on storage)
  • ❗ Basic plan does not include AutoScaling