optimizing your cloud applications in rightscale

of 40 /40
Optimizing Your Cloud Applications in RightScale October 13, 2011 Watch the video of this webinar

Author: rightscale

Post on 20-Aug-2015

557 views

Category:

Technology


0 download

Embed Size (px)

TRANSCRIPT

  1. 1. Optimizing Your Cloud Applications in RightScale
    October 13, 2011
    Watch the video of this webinar
  2. 2. Your Panel Today
    Presenting
    • Rafael H. Saavedra, VP Engineering, RightScale
    • 3. Raphael Simon, Sr. Systems Architect, RightScale
    Q&A
    Jordan Evans, Account Manager, RightScale
    Please use the Questions window to ask questions any time!
  3. 4. Agenda
    Introduction
    3-tier application architecture
    Vertical & horizontal scaling
    RightScale monitoringand cluster graphs
    New Relic RPM
    Support for optimizing DB performance
    Load testing
    Please use the Questions window to ask questions any time!
  4. 5. Multi-tenancy
    Shared resource pooling
    Geo-distribution and ubiquitous network access
    Service oriented
    Dynamic resource provisioning
    Self-organizing
    Utility based pricing
    Cloud computing characteristics
  5. 6. No upfront investment
    Lowering operating costs
    Highly scalable
    Easy access
    Reduces business risk and maintenance costs
    Enables process automation
    Cloud computing advantages
  6. 7. 3-tier application architecture
    Load balancers
    An array of application servers
    Master-slave
  7. 8. Optimizing Your Cloud Applications in RightScale
    Vertical & Horizontal Scaling
  8. 9. Instance size (vertical scaling)
    Instance autoscaling (horizontal scaling)
    Server arrays
    RightScale support for performance optimization
    ServerTemplates are configured to capture performance data
    CollectdRightScripts
    Hardware & OS monitoring data
    Specialized plugins MySQL, HAProxy, Apache, NgInx, IIS, etc
    Monitoring graphs: individual, cluster, stacked, heat maps
    Alerts & escalations
    New Relic RPM
    Cloud performance optimization
  9. 10. Compute units vs memory
    Scaling up spectrum of instance sizes
  10. 11. Server arrays provide horizontal scaling
  11. 12. The array scales up or down based on performance votes
    Tags allow scaling on an arbitrary decision set
    Decision threshold controls reaction time
    Sleep time allows new resources to have an impact
    Scaling can be time dependent
    Detailed setup instructions: http://bit.ly/c1oLr2
    Fast response to changes in load conditions using alerts
    Allocation of servers to availability zones based on weights
    Deployment-based so configuration is consistent
    Arrays can be pre-scaled to support anticipated demand
    Server arrays provide horizontal scaling
  12. 13. Optimizing Your Cloud Applications in RightScale
    Monitoring & Cluster Graphs
    with RightScale
  13. 14. Server monitoring graphs
  14. 15. Cluster monitoring
    Individual graphs
    Good for a dozen servers
    Displays all standard graphs with full detail
    Stacked graphs
    Displays the contribution of many servers to a total
    Great to see the sum and variability of activity in a cluster
    Difficult to make out individual servers
    Examples: requests/sec, cpu busy cycles, I/O bytes/sec
    Heat maps
    Displays a bar for each server
    Great to see uneven distribution across servers
    Great to quickly spot performance problems across many servers
    Difficult to read absolute values or see the total cluster activity
  15. 16. Cluster monitoring architecture
    Architecture
    Monitoring front-end serverspull data from storage servers
    Up to 100 servers on one graph(to be increased)
    monitoring
    storage
    servers
    monitoring
    front-end
    servers
    your servers
  16. 17. Cluster monitoring
    Current cluster monitoring: one graph per server
  17. 18. Stacked graphs
    Each color band shows contribution of one server
    Servers are stacked on top of one another
  18. 19. Heat maps
    Each horizontal strip shows one server
    The color shows how hot the server is running
  19. 20. Heat map with 100 servers
  20. 21. Stacked graph of the same 100 servers
  21. 22. Optimizing Your Cloud Applications in RightScale
    Application Performance Analytics with New Relic
  22. 23. Real-Time App Performance Analytics
    Supports Ruby, PHP, Java & .Net
    SQL & NoSQL performance
    Web transaction tracing
    Performance notifications
    Availability monitoring
    Scalability analysis
    New Relic RPM
  23. 24. New Relic RPM
    Direct access from RightScale dashboard
  24. 25. New Relic RPM
    Historical statistics over a period of time
  25. 26. New Relic RPM
    Distribution of the most time consuming requests
  26. 27. New Relic RPM
    Statistics about response times from different countries
  27. 28. New Relic RPM
    Detailed response times by browser
  28. 29. An expensive query
    The N+1 query problem
    New Relic RPM 2 Examples
  29. 30. Optimizing Your Cloud Applications in RightScale
    Optimizing Database Performance
  30. 31. Optimizing DB performance
    RightScale MySQLServerTemplates
    Configuration files tailored to instance size
    innodb_buffer_pool_size
    key_buffer_size
    thread_size
    sort_buffer_size
    The never ending task of identifying current bottlenecks
    Disk seeks
    Performance of disk operations
    Scale up when working set cannot fit in memory avoid active swapping
    Constant monitoring of performance graphs, logs and query
    Schema considerations
  31. 32. Schema considerations
    Lookups need to be indexed
    Sorting requires an index
    Joins need to be done on indices
    Become slower as tables grow
    Compounded indices should be used consistently
    Do not abuse indices
    Each index requires a disk write
    Compact tables if they become fragmented
    Deleted rows do not remove the corresponding index entries
  32. 33. Monitoring DB performance
    Standard collectd statistics
    User vs wait time (disk operations)
    Performance of disk operations
    Scale up when working set cannot fit in memory
    MySQLcollectdplugin
    Monitor INSERT, SELECT, UPDATE operations
    The breakdown of read operations can indicate missing indices
    Monitoring /var/log/mysqlslow.log file
    Identify slow queries
    Use MySQL EXPLAIN command to identify query plan
  33. 34. MySQLCollectdPlugin
    Uses MySQL SHOW STATUS command to collect statistics
    A large set of counters that are divided into 10 categories
    Connections
    IO Requests
    Select Rates
    Read Rates
    Key Rates
    Commands Rates
    Query Cache
    Tables
    Memory
    Misc.
  34. 35. MySQLCollectdPlugin
    Uses MySQL SHOW STATUS command to collect statistics
  35. 36. Mysqlslow.log & explain command
  36. 37. MySQL performance depends on locality
    Wait time should be minimum when working set fits in memory
    Performance degrades once wait time is significant
    wait time insignificant
    user time dominates
  37. 38. MySQL reads graphs
    Read-random-next represents a table scan
    Read-next represents an index scan
  38. 39. Optimizing Your Cloud Applications in RightScale
    Load Testing
  39. 40. Load testing using httperf
    RightScale provides ServerTemplates in the marketplace
    https://my.rightscale.com/library/server_templates/Httperf-Load-Tester/24714
    Tutorial on httperf setup and configuration
    http://support.rightscale.com/03-Tutorials/02-AWS/E2E_Examples/E2E_Gaming_Deployment/Adding_Httperf_Load_Tester
  40. 41. Getting Started and Q&A
    Contact RightScale:
    Next up in the Im in the Cloud Now What? series:
    October 20
    Automating Servers in the Cloud
    • Darryl Eaton, Dir. Product Management, RightScale
    www.RightScale.com/now-what
    (866) 720-0208
    [email protected]
    www.rightscale.com
    More Info
    Webinar archive: RightScale.com/webinars
    Whitepapers: RightScale.com/whitepapers
    Free Edition: RightScale.com/free
    RightScale Conference
    Nov 8-9 in Santa Clara, CA
    www.RightScale.com/Conference
    • Attend technical breakout sessions
    • 42. Talk with RightScale customers
    • 43. Ask questions at the Genius Bar