5 years of building saas on aws

53
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Christian Beedgen October 2015 5 Years of Building SaaS on AWS A Story by Sumo Logic

Upload: christian-beedgen

Post on 15-Jan-2017

771 views

Category:

Software


0 download

TRANSCRIPT

Page 1: 5 Years Of Building SaaS On AWS

© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Christian Beedgen

October 2015

5 Years of Building SaaS on AWSA Story by Sumo Logic

Page 2: 5 Years Of Building SaaS On AWS

$ whoami

Co-Founder & CTO, Sumo LogicCloud-based Machine Data Analytics ServiceApplications, Operations, Security

Chief Architect, ArcSightMajor SIEM player in the enterprise spaceLog Management for security and compliance

Page 3: 5 Years Of Building SaaS On AWS

From Data to Decisions

DEVOPS

Streamline continuous delivery

Monitor KPI’s and Metrics

Accelerate Troubleshooting

IT INFRASTRUCTURE AND OPERATIONS

Monitor all workloads

Troubleshoot and increase uptime

Simplify, Modernize, and save costs

COMPLIANCE AND SECURITY

COMPLIANCE AND SECURITYAutomate and demonstrate compliance

Audit all systems

Think beyond rules

Cloud Analytics Platform

DEVOPSIT INFRASTRUCTURE

AND OPERATIONSCOMPLIANCE AND

SECURITY

Page 4: 5 Years Of Building SaaS On AWS

Cloud Analytics Platform

From Data to Decisions

DEVOPSIT INFRASTRUCTURE

AND OPERATIONSCOMPLIANCE AND

SECURITY

Customer A Cloud

COLLECTOR COLLECTOR

Customer A Data Center Customer B Data Center

COLLECTOR

Customer B Cloud

COLLECTOR

Page 5: 5 Years Of Building SaaS On AWS

Why SaaS?

Because enterprise software sucks™

Page 6: 5 Years Of Building SaaS On AWS

Why SaaS?

Because enterprise software sucks™

Too much pain for the customerTime spent running the system is not spent using the systemExpensive when done adding hardware and people

Page 7: 5 Years Of Building SaaS On AWS

Why SaaS?

Because enterprise software sucks™

Too much pain for the customerTime spent running the system, not spent using the systemExpensive when done adding hardware and people

Disastrous for the vendorNo control over the runtime, hard to diagnose problemsKills innovation because each release lives forever

Page 8: 5 Years Of Building SaaS On AWS

Why AWS?

We are developers, not data center people

AWS has turned the data center into an API

As developers, we understand reuse (libraries, OSs, …)

Today’s systems require reuse on a higher level

Do you really want to care for 4,000 machines? HA? DR?

Page 9: 5 Years Of Building SaaS On AWS

Anti-monolithic

In previous gigs, we dealt with monolithic systems

With Sumo, we knew what we needed to build, no MVP required

Get data into the system, index it, provide query function

So we had a logical breakdown immediately

And we knew it had to scale…

…not just to the biggest customer, but to all customers!

Page 10: 5 Years Of Building SaaS On AWS

Ingestion Path

Receiver Bus Index

Raw

CQ

S3

Page 11: 5 Years Of Building SaaS On AWS

Analytics Path

Query

Service

CQ

S3

Page 12: 5 Years Of Building SaaS On AWS

Scale Today

50 TB of new incoming data per day

Double-digit PB of data under management

>2,000,000 queries/day

Thousands of instances in 4 regions globally

Page 13: 5 Years Of Building SaaS On AWS

Divide & Conquer

Page 14: 5 Years Of Building SaaS On AWS

Divide & Conquer

3 to 1000s of instances!

Page 15: 5 Years Of Building SaaS On AWS

Divide & Conquer

Each box in the previous images

is an application

Page 16: 5 Years Of Building SaaS On AWS

Divide & Conquer

Blast radius, bulk-heading,

concern separation

Page 17: 5 Years Of Building SaaS On AWS

Divide & Conquer

Not everything will break all the

time – repair engines, not plane

Page 18: 5 Years Of Building SaaS On AWS

Divide & Conquer

Not everybody will need to work

on everything all the time

Page 19: 5 Years Of Building SaaS On AWS

What We Actually Did

Compose applications from layers of modules

Whole system is Scala on top of the JVM

One Maven POM per module, one main() per application

Initially one GitHub repository per module, today just one project

Right size AWS instance for each application cluster

Each application exposes a façade

Avro over HTTP, or Avro over HornetQ, or Avro over Kafka

Page 20: 5 Years Of Building SaaS On AWS
Page 21: 5 Years Of Building SaaS On AWS

How I Actually Visualize Microservices

Page 22: 5 Years Of Building SaaS On AWS

2 to the power of 5 services (“32”), 170+ modules

Don’t even ask about the # of dependencies

At least 3 of each – everything is a separately scalable cluster

Page 23: 5 Years Of Building SaaS On AWS

Service Discovery

Loose coupling in the large…A deployment is made up of many thingsSome of these things need to talk to each otherSome of these things come and goDon’t pass in a huge list of static dependenciesStart each application with one parameter

$ bin/receiver prod.service-registry.sumologic.com

Page 24: 5 Years Of Building SaaS On AWS

Anti-singletenant

Multi-dimensional scaling predicates multitenancy

This is a data processing platform – cost matters!

Autoscaling single tenants is too fine-grained for us

Also, efficiency… one code line “master” in deployment

Customers aren’t pets, they are cattle

Page 25: 5 Years Of Building SaaS On AWS

Anti-singletenant

Multi-dimensional scaling predicates multitenancy

This is a data processing platform – cost matters!

Autoscaling single tenants is too fine-grained for us

Also, efficiency… one code line “master” in deployment

Customers aren’t pets, they are cattle

Page 26: 5 Years Of Building SaaS On AWS

Anti-singletenant

Multi-dimensional scaling predicates multitenancy

This is a data processing platform – cost matters!

Autoscaling single tenants is too fine-grained for us

Also, efficiency… one code line “master” in deployment

Customers aren’t pets, they are cattle

Yum yum yum… FEATURE FLAGS!!!

Page 27: 5 Years Of Building SaaS On AWS

Just one typical Sumo Logic customer - 8x Variance!

Page 28: 5 Years Of Building SaaS On AWS

Just one typical Sumo Logic customer - 8x Variance!

Money flushed down the toilet

Page 29: 5 Years Of Building SaaS On AWS

Just one typical Sumo Logic customer - 8x Variance!

Money flushed down the toilet

Load per tenant fluctuates wildly, but

aggregated system load just goes up slowly

Page 30: 5 Years Of Building SaaS On AWS

Anti-manual

We use Jenkins, of course

We still build system versions as cross-cuts and QA them

We are busy moving toward true continuous delivery

Application Groups for things that evolve together…

…and that can be deployed together

Page 31: 5 Years Of Building SaaS On AWS
Page 32: 5 Years Of Building SaaS On AWS

ProdLongStagNite

Page 33: 5 Years Of Building SaaS On AWS

dsh: Another AWS Deployment Tool

Model-driven, describe desired state, run to make it so

High performance due to parallelization

Covers all layers of the stack – AWS, OS, Sumo Logic

Easy to use and extend, scriptable CLI

Developer-friendly, Scala-based, high-level APIs

Page 34: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

EC2

EC2

Route53

S3 Glacier

CloudFront

DynamoDB RDSElastiCache

DynamoDBDynamoDB RedShift

WorkSpaces

CloudWatch CloudTrailIAM

CodeDeploy

BeanstalkCloudFormationOpsWorksSWF

SWF

EMR EMR Kinesis

SNS

MobileAnalytics

Kinesis SNSCognitoDirectory

Service

CloudSearch

AppStream

SES SQS

SWF XCode

Data Pipeline

Page 35: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

3 ELBs (service, api, receiver)

Page 36: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

EC2, obviouslyRIs, dabbling with Spot

Page 37: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

SES for alert emails to our customers

Page 38: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

SQS for user registration from corporate website

Page 39: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

Petabytes of S3

Page 40: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

ElastiCache Memcache for client object caches

Page 41: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

DynamoDB for feature flags and configuration

Page 42: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

RDS MySQL for configuration and content objects

Page 43: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

SimpleDB for deployment location

Page 44: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement Sumo Logic

Page 45: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement Sumo Logic

CloudWatch, CloudTrail

Page 46: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

Sumo Logic!

Page 47: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

Zuora for billing

Page 48: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement Jenkins, GitHub

Page 49: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

Our own automation framework – “dsh”

Page 50: 5 Years Of Building SaaS On AWS

Data Access Layer

Delivery

Authentication &Authorization

MeteringMonitoring

Ordering

Provisioning

BillingAnalytics

Resource Management SaaS Application(s)

Business Services Core Platform Services

Interaction

Application

Add

ition

al A

pplic

atio

ns

Application LifecycleManagement

CloudFormation for Mesos cluster setup

Page 51: 5 Years Of Building SaaS On AWS

Integrations

Generic S3 CollectionAmazon S3 AuditElastic Load BalancingAmazon CloudFrontAWS CloudTrailAmazon VPC Flow LogsAWS Config

Page 52: 5 Years Of Building SaaS On AWS

What Does the Future Hold?

Super happy to see Amazon EFS introduced

Borderline unnaturally excited about AWS KMS

Planning on using AWS Lambda as a “plugin system”

Implementing Mesos for new services

Very excited about Docker to enable better utilization

Page 53: 5 Years Of Building SaaS On AWS

Thank You!

@raychaser