Scaling Runa Inc Big Data e-commerce service with AWS

56
Runa on AWS Big Data & Machine Intelligence for a SaaS Startup

description

Presentation given the first AWS Startup Event 4/14/2010. Describes how Runa was using AWS for its SaaS for e-commerce sites

Transcript of Scaling Runa Inc Big Data e-commerce service with AWS

Page 1: Scaling Runa Inc Big Data e-commerce service with AWS

Runa on AWSBig Data & Machine Intelligence for a SaaS

Startup

Page 2: Scaling Runa Inc Big Data e-commerce service with AWS

Runa

Page 3: Scaling Runa Inc Big Data e-commerce service with AWS

a

SaaS

Page 4: Scaling Runa Inc Big Data e-commerce service with AWS

converts Shoppers to Buyers

Page 5: Scaling Runa Inc Big Data e-commerce service with AWS

for

Online Commerce Sites

Page 6: Scaling Runa Inc Big Data e-commerce service with AWS

by presenting

Dynamic Personalized Promotions

Page 7: Scaling Runa Inc Big Data e-commerce service with AWS

on the

Merchant’s Website

Page 8: Scaling Runa Inc Big Data e-commerce service with AWS

in Real-Time

Page 9: Scaling Runa Inc Big Data e-commerce service with AWS

in the

Shopping Flow

Page 10: Scaling Runa Inc Big Data e-commerce service with AWS

Tech Challenges

Page 11: Scaling Runa Inc Big Data e-commerce service with AWS

Big Data

Page 12: Scaling Runa Inc Big Data e-commerce service with AWS

JavaScript client collects activity on

every Merchant page for every Shopper

Page 13: Scaling Runa Inc Big Data e-commerce service with AWS

One or more Ajax call & Event Store to Runa per

Merchant page view

Page 14: Scaling Runa Inc Big Data e-commerce service with AWS

Step function increase of calls

and stores as each new

Merchant added

Page 15: Scaling Runa Inc Big Data e-commerce service with AWS

We capture everything we

can and store it forever

Page 16: Scaling Runa Inc Big Data e-commerce service with AWS

Expecting to grow to

thousands of merchants

Page 17: Scaling Runa Inc Big Data e-commerce service with AWS

That’s a lot of Data

Page 18: Scaling Runa Inc Big Data e-commerce service with AWS

Processing Data with

Machine Intelligence

Page 19: Scaling Runa Inc Big Data e-commerce service with AWS

Batch Processing for Statistical Analysis

and Reports

Page 20: Scaling Runa Inc Big Data e-commerce service with AWS

Real-Time Rule based inserts of

Promotions

Page 21: Scaling Runa Inc Big Data e-commerce service with AWS

Why AWS for Runa?

Page 22: Scaling Runa Inc Big Data e-commerce service with AWS

At First (a couple years ago)

Page 23: Scaling Runa Inc Big Data e-commerce service with AWS

Not Much Money in the Bank

Page 24: Scaling Runa Inc Big Data e-commerce service with AWS

Didn’t Know exactly

what were making

Page 25: Scaling Runa Inc Big Data e-commerce service with AWS

Or exactly how we were going to do it

Page 26: Scaling Runa Inc Big Data e-commerce service with AWS

Prototyped with Ruby / Rails / MySQL

Page 27: Scaling Runa Inc Big Data e-commerce service with AWS

Then

Prototype became

Production

Page 28: Scaling Runa Inc Big Data e-commerce service with AWS

EC2 & AWS let us scale the prototype to

Beta Production

Page 29: Scaling Runa Inc Big Data e-commerce service with AWS

Flexibility to incrementally

refine service & infrastructure

Page 30: Scaling Runa Inc Big Data e-commerce service with AWS

Confidence we could scale

as we added Merchants

Page 31: Scaling Runa Inc Big Data e-commerce service with AWS

More Recently

Incrementally added next-gen

Tech & Full Production

Page 32: Scaling Runa Inc Big Data e-commerce service with AWS

Goal: Everything

Horizontally Scalable

Page 33: Scaling Runa Inc Big Data e-commerce service with AWS

Batch Processing & Infinite Storage

Map / Reduce & BigTable

via

Hadoop & HBase

Page 34: Scaling Runa Inc Big Data e-commerce service with AWS

Flexible Real-Time parallel processing

via

Clojure / Swarmiji

Page 35: Scaling Runa Inc Big Data e-commerce service with AWS

Opscode ChefManagement & Monitoring

Consumers onMerchant Websites

InternetAdmin & Merchant

Dashboard(Rails)

Runtime Rules

Merchant Info

Merchants

Internet

AnalyticsReporting

Monitor & Recovery

Data Collectors

Hadoop / HBaseMap / ReducePetabyte Store

Load Balancer

HTTP

SharedSessionMemory

HTTPDispatchers

RedisMem

CacheRedisMem

CacheRedisMem

CacheRedisMem

CacheRedisMem

Cache

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

HBaseHBase

Amazon S3Data Backup

9+ Amazon EC2 Instances

Amazon ElasticLoad Balancer

3+ Amazon EC2Instances

Cheshire / Swarmiji

Dynamic Runtime

Queue

Page 36: Scaling Runa Inc Big Data e-commerce service with AWS

AWS Elastic Load Balancer

Rails App ServersNginx / Unicorn EC2 m1.xlarge

MySQL Master / Slave

EC2 m1.xlarge EBS

Legacy Runtime

Rails App Nginx/UnicornMySQL Master/Slave EC2 m1.xlarge / EBS

Merchant Dashboard

EC2 m1.xlarge

HBase / Hadoop

EC2 m1.xlargeEBSRabbitMQ

Cheshire / SwarmijiRedis

EC2 m1.xlarge

Clojure Based RuntimeAWS Elastic

Load Balancer

EC2 m1.large

Opscode Chef

Monitoring

EC2 m1.large

All Deployed on

Page 37: Scaling Runa Inc Big Data e-commerce service with AWS

Deployment & Configuration Management

via Opscode Chef

Page 38: Scaling Runa Inc Big Data e-commerce service with AWS

Good Things

Page 39: Scaling Runa Inc Big Data e-commerce service with AWS

Able to Start Small

Page 40: Scaling Runa Inc Big Data e-commerce service with AWS

Then

GROW BIGGER

Page 41: Scaling Runa Inc Big Data e-commerce service with AWS

Having the flexibility to throw

“Hardware” at our Prototype got

us to market faster

Page 42: Scaling Runa Inc Big Data e-commerce service with AWS

Ability to launch test and staging

environments almost at will

Page 43: Scaling Runa Inc Big Data e-commerce service with AWS

“Hardware” as

“Software”

Page 44: Scaling Runa Inc Big Data e-commerce service with AWS
Page 45: Scaling Runa Inc Big Data e-commerce service with AWS

Living in “interesting”

times

Page 46: Scaling Runa Inc Big Data e-commerce service with AWS

Managing Complexity

lots of moving parts

Page 47: Scaling Runa Inc Big Data e-commerce service with AWS

Easy to launch a few instances

Page 48: Scaling Runa Inc Big Data e-commerce service with AWS

Impossible to manage

horizontal stacks “by hand”

Page 49: Scaling Runa Inc Big Data e-commerce service with AWS

Must have tool like

Opscode Chef

Page 50: Scaling Runa Inc Big Data e-commerce service with AWS

Chef automates deployment & puts it under

Revision Control

Page 51: Scaling Runa Inc Big Data e-commerce service with AWS

There’s going to be some blood

when using cutting edge tech

Page 52: Scaling Runa Inc Big Data e-commerce service with AWS

Lots of Learning Curves to

climb

Page 53: Scaling Runa Inc Big Data e-commerce service with AWS

Useful Monitoring is

hard but Critical

Page 54: Scaling Runa Inc Big Data e-commerce service with AWS

HBase on AWS may be dangerous

because of Hadoop namenode SPOF

Page 55: Scaling Runa Inc Big Data e-commerce service with AWS

EC2 bill can surprise you if you cavalierly

deploy multiple versions of

horizontally scalable environments

Page 56: Scaling Runa Inc Big Data e-commerce service with AWS

Could not do our startup without

AWS or lots more VC Funding