elasticsearch on aws

19
ElasticSearch on AWS Continuously Deployed, Immutable and Stateful

Upload: philipp-garbe

Post on 15-Apr-2017

102 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: ElasticSearch on AWS

ElasticSearch on AWS

Continuously Deployed, Immutable and Stateful

Page 2: ElasticSearch on AWS

About me

● Philipp Garbe (@pgarbe)

● Husband

● Father

● AutoScout24

● Former Microsoft-Fanboy

● Now Docker-Fanboy ;)

Page 3: ElasticSearch on AWS

● Use case: Logging for AS24

● Challenge: How to handle the state?

○ Immutable

○ Continuously Deployed

○ Stateful

● Next challenges

What to expect

Page 4: ElasticSearch on AWS

Project

Tatsu

Page 5: ElasticSearch on AWS

UnifiedLogs

CC

Page 6: ElasticSearch on AWS

STRATEGICGOALSGoals of the business side

ARCHITECTURALPRINCIPLESHigh-Level Principles

DESIGN AND DELIVERY PRINCIPLESTactical measures

REDUCE TIME TO MARKETSpeed, Fast Feedback

COST EFFICIENCYCollect metrics to allow decisions cost vs. value.

SUPPORT DATA-DRIVEN DECISIONSListen to users and validate hypothesis.Provide as many relevant metrics & data as possible.

YOU BUILT IT, YOU RUN ITThe team is responsible for shaping, building, running and maintaining its products. Fast feedback from live and customers helps us to continuously improve.

ORGANIZED AROUND BUSINESS CAPABILITIESBuild teams around products not projects. Follow the domain and respect bounded contexts. Inverse Conway Maneuver.

LOOSELY COUPLEDBy default avoid sharing and tight coupling, except for the big things in common. Don’t create the next monolith.

MACRO AND MICRO ARCHITECTUREClear separation. Autonomous micro services within the rules and constraints of the macro architecture.

AWS FIRSTFavor AWS platform service over managed service, over self-hosted OSS, over self-rolled solutions.

DATA-DRIVEN / METRIC-DRIVENCollect metrics from processes and applications. Analyze, alert and act on them.

ELIMINATE ACCIDENTAL COMPLEXITYStrive to keep it simple. Focus on essential complexity. You build one, you delete one.

AUTONOMOUS TEAMSMake fast local decisions. Be responsible. Know your boundaries. Share findings.

INFRASTRUCTURE AS CODEAutomate everything: Reproducible, traceable and tested.Immutable servers over snowflake servers.

COLLABORATION CULTUREEngineers from all backgrounds work together in collaborative teams as engineers and share responsibilities. No silos.

BE BOLDGo into production early. Value monitoring over tests. Recover and learn. Optimize for MTTR not MTBF.

SECURITY, COMPLIANCE AND DATA PRIVACYSecurity must be included from the beginning and everybody’s concern. Keep data-privacy in mind.

CONTAINMENT AND BOUNDARIESAlign blast radius and vendor lock-in with the boundaries of the organization or business capabilities.

Version 1.0Icons made by Freepik from www.flaticon.com are licensed under CC BY 3.0

https://github.com/autoscout24/scout24-it-principles

Page 7: ElasticSearch on AWS

INFRASTRUCTURE AS CODEAutomate everything: Reproducible, traceable and tested.

Immutable servers over snowflake servers.

Page 8: ElasticSearch on AWS

Some numbers

12 nodes (m4.4xlarge, EBS gp2 á 2000 GB)

9 indices (one per day)

648 shards

7 Billion docs (new documents peak: 2,500 docs / sec)

16.99 TB of data

Page 9: ElasticSearch on AWS

Challenge: How to handle the state?

Page 10: ElasticSearch on AWS

Immutable Servers

Rake

CloudFormation

ElasticSearch configuration

Page 11: ElasticSearch on AWS

Continuously Deployed

● One CloudFormation stack per node

● Rolling updates through rake

● Every commit goes to production

Page 12: ElasticSearch on AWS
Page 13: ElasticSearch on AWS

Stateful

Keep the data!

Page 14: ElasticSearch on AWS
Page 15: ElasticSearch on AWS

Monitoring

● CloudWatch

○ Cron-Lambda sends /_cluster/health metrics to CloudWatch

○ CloudWatch alarms based on these metrics

● DataDog

○ Deep Dive

Page 16: ElasticSearch on AWS

Next challenges

No AvailabilityZone awareness

Page 17: ElasticSearch on AWS

Next challenges

Mapping issues

Page 18: ElasticSearch on AWS

Next challenges

Long-running deployments (2-8h)

Page 19: ElasticSearch on AWS

?Questions

Philipp Garbe

http://garbe.io

@pgarbe

https://github.com/pgarbe