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

Managing Application & Instance State on AWS

Avatar for davidmat davidmat
August 25, 2015

Managing Application & Instance State on AWS

Build stateless applications on AWS. Manage structured & unstructured data, session data, system & application logs and metrics.

Avatar for davidmat

davidmat

August 25, 2015
Tweet

More Decks by davidmat

Other Decks in Technology

Transcript

  1. MANAGING APPLICATION & INSTANCE STATE ON AWS S U M

    M E R O F T E C H N O L O G Y 2 5 / 0 8 / 2 0 1 5
  2. INTRODUCTION • We have the ability to create instances in

    a quick, repeatable, predictable manner • But, we will also have to remove them – Hardware, software failure – Scale down events – New application version (e.g. blue/green deployments) – … • Without losing data or impacting service ⇒ Store state outside of the instances
  3. STATE? • On a system & application level • Types

    State Examples Structured Application Data Customer orders Unstructured Application Data Images, Documents User Session Data Position in an app, Shopping cart Application & System Logs Access, security, audit logs Application & System Metrics CPU load,network throughput
  4. ADVANTAGES • Providing a robust service • Easier to scale

    horizontally • Better user experience • Quicker, less complicated bootstrapping • EC2 Instances as a unit of deployment
  5. STRUCTURED APPLICATION DATA • Amazon RDS – Relational Databases –

    MySQL, Aurora, PostreSQL, MS SQL Server, Oracle – Data backups, recovery, patches – Multi-AZ Deployments, Synchronous Replication • Amazon DynamoDB – NoSQL Document & Key-Value Store – Fully Managed – Automatically Scaling, Capacity Requests
  6. UNSTRUCTURED APPLICATION DATA • Amazon S3 – Object Storage •

    Highly Durable (“Eleven Nines”) • Highly Available • (Nearly) Infinitely Scalable • Feature Rich: Versioning, Lifecycle, Events – Integrates with • CloudFront CDN • Glacier for Archiving – Serve resources directly over HTTP(S) • No need to hit instances
  7. USER SESSION DATA • Amazon ElastiCache – In-Memory Data Store

    – Easy Clustering – Two Caching Engines: • Memcached • Redis • Amazon DynamoDB – Durable Storage – Single-Digit Latency
  8. SYSTEM METRICS • Amazon CloudWatch – Monitoring Service • 1

    or 5 Minute Resolution • 2 Week Data Retention – Collect & Store Custom Metrics • OS-Level • Application Level – Define Alarms • SNS Notifications → Actionable
  9. LOG MANAGEMENT • Amazon CloudWatch Logs – Durable, Scalable Centralized

    Log Storage • Built on top of S3 – Retention Policies – Integration with CloudWatchAlarms – Log Management Agent
  10. RESOURCES • Building Fault Tolerant Applications on AWS (Whitepaper) Jeff

    Barr, Attila Narin, and JineshVaria • Managing Your AWS Infrastructure At Scale (Whitepaper) Shaun Pearce and Steven Bryen • ARC402 – Deployment Automation (reInvent 2014) Chris Munns 11