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

Using Elasticsearch to Power Analytics at AppDynamics

Elastic Co
February 17, 2016

Using Elasticsearch to Power Analytics at AppDynamics

Learn how AppDynamics utilizes Elasticsearch to power the three core uses of AppDynamics Analytics – advanced performance analytics, business impact analytics, and user analytics – as well as lessons learned along the way in deploying and managing large Elasticsearch clusters.

Elastic Co

February 17, 2016
Tweet

More Decks by Elastic Co

Other Decks in Technology

Transcript

  1. 1 Arjun Iyer, Senior Engineering Director, AppDynamics 2/17/2015 Using Elasticsearch

    to power Analytics across Billions of Transactions every day at AppDynamics
  2. 2 About Me •  Lead the “Analytics” BI @ AppDynamics

    as Senior Engineering Director. •  Manage a team of Big Data engineers and Data Scientists. •  Passionate about Distributed Systems and Machine Learning.
  3. 3 Agenda •  Brief Overview of AppDynamics •  Why Elasticsearch

    ? •  Data/Index Model •  RCA using Significant Terms •  Scaling Elasticsearch •  Monitoring and Index Management •  Future Direction
  4. 5 To watch every line of code and empower organizations

    to innovate, compete and Win in the Digital age Company Vision
  5. 6 Application Intelligence from AppDynamics Market leadership 100% growth 2014

    Net promoter score 1,800+ customers Our Platform 8 Smart services On-Premises, SaaS, or Cloud Rapid time to value Low cost of ownership Enterprise adoption Scalable – 18/20 largest APM deployments Website download 85
  6. 7 Copyright © 2014 AppDynamics. All rights reserved. 7 Application

    complexity is exploding SOA NOSQL Cloud Agile Micro-services IoT ESB/MQ WEBLOGIC SERVICE MONGODB TOMCAT SERVICE Login Flight Status Search Flight Purchase Web Mobile NETWORK ORACLE APACHE JBOSS SERVICE ESB/MQ NETWORK WEBLOGIC SERVICE MONGODB ORACLE TOMCAT SERVICE JBOSS SERVICE
  7. 8 What if you knew in real-time? Top Product Categories

    Customers by Tier Average Response Time $232,390 Revenue impact of poor performance Top products generating highest revenue Revenue by cities Most of customers experiencing issues are Platinum Total Revenues Top Cities Performance timestamp indicating trend towards problem
  8. 12 Schemas Mobile Browser Biz Txn Logs Custom •  Free

    text fields •  Dynamic fields •  Nested structures
  9. 13 Index Model •  Always use doc values ! • 

    Index per account per type * (roll indices by size) ‒  We chose this finally to get the granularity & isolation we need ‒  Need to be more careful about cluster state as the #indices increase •  One index (fields for account and type) ‒  Runs into the “sparse” index problem ‒  Purging is much harder ‒  Not much isolation (all eggs in 1 basket/index!) •  Index per type (field for account) ‒  Again isolation is lower and also suffers from the purge problem
  10. 14 Mapping – Storage Requirements _source   storage   LZ4

    / DEFLATE analyzed   fields   Reverse   Index   Terms dictionary compression non_analyzed   fields   Doc_values (columnar)   Doc values compression
  11. 16 Significant Terms •  An aggregation that returns interesting or

    unusual occurrences of terms in a set. •  These are the terms that have undergone a significant change in popularity measured between a foreground and background set.
  12. 18 Our enhancements •  Dynamic baseline ‒  Default is the

    whole index ‒  We calculate the baseline based on given query and it’s time range •  Score Normalization ‒  We normalize the scores [0-100] using logistic function
  13. 24 AWS – EC2 instance types •  EBS backed instances

    are another option but needs further testing
  14. 25 Things to keep in mind •  Watch out for

    cluster state. Keep minimum #shards to achieve performance target. •  Choose #replicas carefully. For high write throughput and lower costs, replica=1 works best. •  Keep shard size within HEAP. •  Use tiered storage for lower costs ( https://www.elastic.co/blog/hot-warm-architecture) •  Optimize settings for SSDs (E.g disable merge throttling etc)
  15. 30 Index Management •  Roll Indices by size or time

    ‒  Allows you to change mapping and/or #shards ‒  Easy to purge older data (index deletion is fast!) •  Purge older data by deleting indices (fast) ‒  Deleting data using scan/scroll is slow •  Aliases are your friend! Use them liberally J ‒  1 write index ‒  Multiple read indices •  Automate Backups using snapshots
  16. 32 We’re interested in… •  Query streaming •  Job management

    (3.0?) –  https://github.com/elastic/elasticsearch/issues/15117 •  Leveraging more statistical aggregations like moving average, Holt- Winters etc. •  Potential use of Mesos to manage ES clusters