Upgrade to Pro — share decks privately, control downloads, hide ads and more …

HA and Elastic Scaling... It's Easy on Azure

geevcookie
September 29, 2017

HA and Elastic Scaling... It's Easy on Azure

Azure is a fast growing collection of integrated cloud services. With these powerful services, it is easy to achieve high availability and elastic scaling. During this talk, I will show you exactly just how easy it is. He will be sharing a few tips and tricks that he picked up during his journey as well as any stumbling blocks he hit on the way.

geevcookie

September 29, 2017
Tweet

More Decks by geevcookie

Other Decks in Programming

Transcript

  1. HA and Elastic Scaling…
    It’s Easy on Azure

    View full-size slide

  2. § Architect At Tangent Solutions
    § Organiser:
    § JoburgPHP
    § PHP South Africa (This Lovely Event)
    § Find Me At:
    § @geevCookie
    § geevcookie.com
    § tangentsolutions.co.za
    § Azure Lover!!!
    Hi There!
    I’m Zander Janse van Rensburg

    View full-size slide

  3. Azure Is Coming
    To South Africa!!!

    View full-size slide

  4. What Is Azure?
    § Microsoft Azure is a growing collection of integrated cloud
    services that developers and IT professionals use to build,
    deploy, and manage applications through their global
    network of datacenters.

    View full-size slide

  5. On Premises
    You scale, make resilient and manage
    Infrastructure
    (as a Service)
    Managed by vendor
    You scale, make
    resilient & manage
    Platform
    (as a Service)
    Scale, resilience and
    management by vendor
    You manage
    Software
    (as a Service)
    Applications
    Scale, resilience and
    management by vendor
    Why The Cloud?

    View full-size slide

  6. Common Scaling
    Problems

    View full-size slide

  7. § By default, PHP stores sessions in files
    § This does not carry across multiple servers
    Common Scaling Problems
    #1 Session Storage

    View full-size slide

  8. § Cloud servers should be thought of as utility resources
    § They can be created and destroyed as required
    § Use a share-nothing design
    § Each node is independent and self-sufficient
    Common Scaling Problems
    #2 Thinking Servers Will Run Forever

    View full-size slide

  9. § Local storage should only be used as temporary storage
    § Use network storage for configuration or long-lived files
    Common Scaling Problems
    #3 Using Local Storage

    View full-size slide

  10. § Multiple approaches
    § Read replicas
    § Multi-masters
    Common Scaling Problems
    #4 Not Scaling DB

    View full-size slide

  11. § Monolithic application handles requests as well as all background processing
    § Separate concerns by moving background processing to worker queue
    Common Scaling Problems
    #5 No Distributed Processing

    View full-size slide

  12. § Elasticity requires proper deployment plan
    § Runtime errors during deployment
    § All hosts require same version to prevent requests from behaving differently
    Common Scaling Problems
    #6 Deployment

    View full-size slide

  13. § Session Storage
    § Servers Are Utility Resources
    § Local Storage
    § Scaling DB
    § Distributed Processing
    § Deployment
    Common Scaling Problems
    Summary

    View full-size slide

  14. Going HA and Elastic
    With Azure…

    View full-size slide

  15. § Elasticity for free
    § Deployment for free
    § Easy to manually scale up or out
    § Scaling up = Vertical Scaling
    § Scaling out = Horizontal Scaling
    § Easy deployment
    Azure Components
    #1 Introducing App Services

    View full-size slide

  16. § App Service For Linux uses Docker containers
    § Code is deployed to “/home/sites/wwwroot”
    § Kudu mounts “/home/sites” into the container
    § Default containers for PHP 5.6 and 7.0
    § https://github.com/Azure-App-Service/php
    § Tangent Solutions Containers
    § Laravel
    § Symfony
    Getting Your Application Ready
    #1.1 Using App Services

    View full-size slide

  17. § Session Storage
    § Servers Are Utility Resources
    § Local Storage
    § Scaling DB
    § Distributed Processing
    § Deployment
    Common Scaling Problems
    Checklist

    View full-size slide

  18. § DB as a service
    § Easy to scale
    § Managed:
    § Patching
    § Backups
    § Monitoring
    § Security
    Azure Components
    #2 Introducing Azure DB For MySQL

    View full-size slide

  19. § Session Storage
    § Servers Are Utility Resources
    § Local Storage
    § Scaling DB
    § Distributed Processing
    § Deployment
    Common Scaling Problems
    Checklist

    View full-size slide

  20. § Serverless
    § Multiple languages
    § Amazing integration
    Azure Components
    #3 Introducing Azure Functions

    View full-size slide

  21. § Replaces Cron Jobs
    § + More
    § Examples:
    § Monitor Blob Storage for a new file and create required thumbnails
    § Run scheduled imports from external DB
    § Run scheduled complex computations such as pricing changes etc…
    § Send scheduled reports from application DB
    Azure Components
    #3.1 Using Azure Functions

    View full-size slide

  22. § Session Storage
    § Servers Are Utility Resources
    § Local Storage
    § Scaling DB
    § Distributed Processing
    § Deployment
    Common Scaling Problems
    Checklist

    View full-size slide

  23. § Massive Amounts of Premium Storage
    § Great Integration
    § Easy Redundancy
    Azure Components
    #4 Azure Blob Storage

    View full-size slide

  24. § FlySystem
    § CDN (Akamai)
    Azure Components
    #4.1 Using Azure Blob Storage

    View full-size slide

  25. § Session Storage
    § Servers Are Utility Resources
    § Local Storage
    § Scaling DB
    § Distributed Processing
    § Deployment
    Common Scaling Problems
    Checklist

    View full-size slide

  26. § Distributed Caching
    § Automatic Sharding
    § Persistent Storage Available
    Azure Components
    #5 Redis Cache

    View full-size slide

  27. § Session Storage
    § Servers Are Utility Resources
    § Local Storage
    § Scaling DB
    § Distributed Processing
    § Deployment
    Common Scaling Problems
    Checklist

    View full-size slide

  28. Get started today at
    http://azure.microsoft.com

    View full-size slide