Ne#lix in the Cloud Nov 3, 2010 Adrian Cockcro: - - PowerPoint PPT Presentation

ne lix in the cloud
SMART_READER_LITE
LIVE PREVIEW

Ne#lix in the Cloud Nov 3, 2010 Adrian Cockcro: - - PowerPoint PPT Presentation

Ne#lix in the Cloud Nov 3, 2010 Adrian Cockcro: @adrianco #ne#lixcloud acockcro:@ne#lix.com h?p://www.linkedin.com/in/adriancockcro: With more than 16 million


slide-1
SLIDE 1

Ne#lix ¡in ¡the ¡Cloud ¡

Nov ¡3, ¡2010 ¡ Adrian ¡Cockcro: ¡

@adrianco ¡#ne#lixcloud ¡ acockcro:@ne#lix.com ¡ h?p://www.linkedin.com/in/adriancockcro: ¡

slide-2
SLIDE 2

With ¡more ¡than ¡16 ¡million ¡subscribers ¡in ¡the ¡ United ¡States ¡and ¡Canada, ¡Ne9lix, ¡Inc. ¡is ¡the ¡ world’s ¡leading ¡Internet ¡subscripAon ¡service ¡ for ¡enjoying ¡movies ¡and ¡TV ¡shows. ¡

slide-3
SLIDE 3

Why ¡Give ¡This ¡Talk? ¡

slide-4
SLIDE 4

Ne#lix ¡is ¡Path-­‑finding ¡

The ¡Cloud ¡ecosystem ¡is ¡evolving ¡very ¡fast ¡ Share ¡with ¡and ¡learn ¡from ¡the ¡cloud ¡community ¡

slide-5
SLIDE 5

We ¡want ¡to ¡use ¡clouds, ¡ not ¡build ¡them ¡

Cloud ¡technology ¡should ¡be ¡a ¡commodity ¡ Public ¡cloud ¡and ¡open ¡source ¡for ¡agility ¡and ¡scale ¡

slide-6
SLIDE 6

We ¡are ¡looking ¡for ¡talent ¡

Ne#lix ¡wants ¡to ¡connect ¡with ¡the ¡very ¡best ¡ engineers ¡

slide-7
SLIDE 7

Why ¡Use ¡AWS? ¡

slide-8
SLIDE 8

We ¡stopped ¡building ¡our ¡own ¡ datacenters ¡

Capacity ¡growth ¡rate ¡is ¡acceleraRng, ¡unpredictable ¡ Product ¡launch ¡spikes ¡-­‑ ¡iPhone, ¡Wii, ¡PS3, ¡XBox ¡ Datacenter ¡is ¡large ¡inflexible ¡capital ¡commitment ¡

slide-9
SLIDE 9

Customers ¡

Q3 ¡year/year ¡+52% ¡Total ¡and ¡+145% ¡Streaming ¡

0 ¡ 2 ¡ 4 ¡ 6 ¡ 8 ¡ 10 ¡ 12 ¡ 14 ¡ 16 ¡ 18 ¡ 2009Q2 ¡ 2009Q3 ¡ 2009Q4 ¡ 2010Q1 ¡ 2010Q2 ¡ 2010Q3 ¡

Source: ¡h?p://ir.ne#lix.com ¡

slide-10
SLIDE 10

Leverage ¡AWS ¡Scale ¡ “the ¡biggest ¡public ¡cloud” ¡

AWS ¡investment ¡in ¡tooling ¡and ¡automaRon ¡ AWS ¡zones ¡for ¡high ¡availability, ¡scalability ¡ AWS ¡skills ¡are ¡common ¡on ¡resumes… ¡

slide-11
SLIDE 11

Leverage ¡AWS ¡Feature ¡Set ¡ “two ¡years ¡ahead ¡of ¡the ¡others” ¡

EC2, ¡S3, ¡SDB, ¡SQS, ¡EBS, ¡EMR, ¡ELB, ¡ASG, ¡IAM, ¡RDB ¡

slide-12
SLIDE 12

“The ¡cloud ¡lets ¡its ¡users ¡focus ¡

  • n ¡delivering ¡differenAaAng ¡

business ¡value ¡instead ¡of ¡ wasAng ¡valuable ¡resources ¡

  • n ¡the ¡undifferen)ated ¡

heavy ¡li0ing ¡that ¡makes ¡up ¡ most ¡of ¡IT ¡infrastructure.” ¡ ¡Werner ¡Vogels ¡ ¡Amazon ¡CTO ¡

slide-13
SLIDE 13

Ne#lix ¡Deployed ¡on ¡AWS ¡

Content ¡

Video ¡ Masters ¡ EC2 ¡ S3 ¡ CDN ¡

Logs ¡

S3 ¡ EMR ¡ Hadoop ¡ Hive ¡ Business ¡ Intelligence ¡

Play ¡

DRM ¡ CDN ¡ rouRng ¡ Bookmarks ¡ Logging ¡

WWW ¡

Search ¡ Movie ¡ Choosing ¡ RaRngs ¡ Similars ¡

API ¡

Metadata ¡ Device ¡ Config ¡ TV ¡Movie ¡ Choosing ¡ Mobile ¡ iPhone ¡

slide-14
SLIDE 14

Movie ¡Encoding ¡farm ¡(2009) ¡

  • Tens ¡of ¡thousands ¡of ¡videos ¡
  • Thousands ¡of ¡EC2 ¡instances ¡
  • Encoding ¡apps ¡on ¡MS ¡Windows ¡
  • ~100 ¡speed/format ¡permutaRons ¡ ¡
  • Petabytes ¡of ¡S3 ¡
  • Content ¡Delivery ¡Networks ¡

“Ne9lix ¡is ¡one ¡of ¡the ¡largest ¡customers ¡

  • f ¡the ¡biggest ¡CDNs ¡Akamai ¡and ¡

Limelight” ¡

Content ¡

Video ¡ Masters ¡ EC2 ¡ S3 ¡ CDN ¡

slide-15
SLIDE 15

Hadoop ¡-­‑ ¡ElasRc ¡Map-­‑Reduce ¡(2009) ¡

  • Web ¡Access ¡Logs ¡
  • Streaming ¡Service ¡Logs ¡
  • Terabyte ¡per ¡day ¡scale ¡
  • Easy ¡Hadoop ¡via ¡Amazon ¡EMR ¡
  • Hive ¡SQL ¡“Data ¡Mart” ¡
  • Gateway ¡to ¡Datacenter ¡BI ¡

Slideshare.net ¡talks ¡ evamtse ¡“Ne#lix: ¡Hive ¡User ¡Group” ¡h?p://slidesha.re/aqJLAC ¡ adrianco ¡“Crunch ¡Your ¡Data ¡In ¡The ¡Cloud” ¡h?p://slidesha.re/dx4oCK ¡

Logs ¡

S3 ¡ EMR ¡ Hadoop ¡ Hive ¡ Business ¡ Intelligence ¡

slide-16
SLIDE 16

Streaming ¡Service ¡Back-­‑end ¡ (early ¡2010) ¡

  • PC/Mac ¡Silverlight ¡Player ¡Support ¡
  • Highly ¡available ¡“play ¡bu?on” ¡
  • DRM ¡Key ¡Management ¡
  • Generate ¡route ¡to ¡stream ¡on ¡CDN ¡
  • Lookup ¡bookmark ¡for ¡user/movie ¡
  • Update ¡bookmark ¡for ¡user/movie ¡
  • Log ¡quality ¡of ¡service ¡

Play ¡

DRM ¡ CDN ¡ rouRng ¡ Bookmarks ¡ Logging ¡

slide-17
SLIDE 17

Web ¡site, ¡a ¡page ¡at ¡a ¡Rme ¡ (through ¡2010) ¡

  • Clean ¡presentaRon ¡layer ¡rewrite ¡
  • Search ¡auto-­‑complete ¡
  • Search ¡backend ¡and ¡landing ¡page ¡
  • Movie ¡and ¡genre ¡choosing ¡
  • Star ¡raRngs ¡and ¡recommendaRons ¡
  • Similar ¡movies ¡
  • Page ¡by ¡page ¡to ¡80% ¡of ¡views ¡

(leave ¡account ¡signup ¡in ¡DC) ¡

WWW ¡

Search ¡ Movie ¡ Choosing ¡ RaRngs ¡ Similars ¡

slide-18
SLIDE 18

API ¡for ¡TV ¡devices ¡and ¡iPhone ¡etc. ¡ (2010) ¡

  • REST ¡API: ¡developer.ne#lix.com ¡
  • Interfaces ¡to ¡everything ¡else ¡
  • TV ¡Device ¡ConfiguraRon ¡
  • Personalized ¡movie ¡choosing ¡
  • iPhone ¡Launch ¡in ¡the ¡cloud ¡only ¡

“Ne9lix ¡is ¡an ¡API ¡for ¡streaming ¡to ¡TVs ¡ ¡(we ¡also ¡do ¡DVD’s ¡and ¡a ¡web ¡site)” ¡

API ¡

Metadata ¡ Device ¡ Config ¡ TV ¡Movie ¡ Choosing ¡ Mobile ¡ iPhone ¡

slide-19
SLIDE 19

Ne#lix ¡EC2 ¡Instances ¡per ¡Account ¡

Encoding ¡ Test ¡and ¡ProducRon ¡ Log ¡Analysis ¡

slide-20
SLIDE 20

Learnings… ¡

slide-21
SLIDE 21

Datacenter ¡oriented ¡tools ¡don’t ¡ work ¡

Ephemeral ¡instances ¡ High ¡rate ¡of ¡change ¡

slide-22
SLIDE 22

Cloud ¡Tools ¡Don’t ¡Scale ¡for ¡ Enterprise ¡

Too ¡many ¡are ¡“Startup” ¡oriented ¡ Built ¡our ¡own ¡tools ¡ Drove ¡vendors ¡hard ¡

slide-23
SLIDE 23

“fork-­‑li:ed” ¡apps ¡don’t ¡work ¡well ¡

Fragile ¡ Too ¡many ¡datacenter ¡oriented ¡ assumpRons ¡

slide-24
SLIDE 24

Faster ¡to ¡re-­‑code ¡from ¡scratch ¡

  • Re-­‑architected ¡and ¡re-­‑wrote ¡most ¡of ¡the ¡code ¡
  • Fine ¡grain ¡web ¡services ¡
  • Leveraged ¡many ¡open ¡source ¡Java ¡projects ¡
  • SystemaRcally ¡instrumented ¡
  • “NoSQL” ¡SimpleDB ¡backend ¡
slide-25
SLIDE 25

“In ¡the ¡datacenter, ¡robust ¡code ¡is ¡best ¡

  • pracAce. ¡In ¡the ¡cloud, ¡it’s ¡essenAal.” ¡
slide-26
SLIDE 26

Takeaway ¡

Ne9lix ¡is ¡path-­‑finding ¡the ¡use ¡of ¡public ¡AWS ¡ cloud ¡to ¡replace ¡in-­‑house ¡IT ¡for ¡non-­‑trivial ¡ applicaAons ¡with ¡hundreds ¡of ¡developers ¡and ¡ thousands ¡of ¡systems. ¡ (Pause ¡for ¡quesRons ¡before ¡we ¡dive ¡into ¡details) ¡

slide-27
SLIDE 27

What, ¡Why ¡and ¡How? ¡

The ¡details… ¡

slide-28
SLIDE 28

Synopsis ¡

  • The ¡Goals ¡

– Faster, ¡Scalable, ¡Available ¡and ¡ProducRve ¡

  • AnR-­‑pa?erns ¡and ¡Cloud ¡Architecture ¡

– The ¡things ¡we ¡wanted ¡to ¡change ¡and ¡why ¡

  • Cloud ¡Bring-­‑up ¡Strategy ¡

– Developer ¡TransiRons ¡and ¡Tools ¡

  • Roadmap ¡and ¡Next ¡Steps ¡
slide-29
SLIDE 29

Goals ¡

  • Faster ¡

– Lower ¡latency ¡than ¡the ¡equivalent ¡datacenter ¡web ¡pages ¡and ¡API ¡calls ¡ – Measured ¡as ¡mean ¡and ¡99th ¡percenRle ¡ – For ¡both ¡first ¡hit ¡(e.g. ¡home ¡page) ¡and ¡in-­‑session ¡hits ¡for ¡the ¡same ¡user ¡

  • Scalable ¡

– Avoid ¡needing ¡any ¡more ¡datacenter ¡capacity ¡as ¡subscriber ¡count ¡increases ¡ – No ¡central ¡verRcally ¡scaled ¡databases ¡ – Leverage ¡AWS ¡elasRc ¡capacity ¡effecRvely ¡

  • Available ¡

– SubstanRally ¡higher ¡robustness ¡and ¡availability ¡than ¡datacenter ¡services ¡ – Leverage ¡mulRple ¡AWS ¡availability ¡zones ¡ – No ¡scheduled ¡down ¡Rme, ¡no ¡central ¡database ¡schema ¡to ¡change ¡

  • ProducRve ¡

– OpRmize ¡agility ¡of ¡a ¡large ¡development ¡team ¡with ¡automaRon ¡and ¡tools ¡ – Leave ¡behind ¡complex ¡tangled ¡datacenter ¡code ¡base ¡(~8 ¡year ¡old ¡architecture) ¡ – Enforce ¡clean ¡layered ¡interfaces ¡and ¡re-­‑usable ¡components ¡

slide-30
SLIDE 30

Cloud ¡Architecture ¡Pa?erns ¡

Where ¡do ¡we ¡start? ¡

slide-31
SLIDE 31

Datacenter ¡AnR-­‑Pa?erns ¡

What ¡do ¡we ¡currently ¡do ¡in ¡the ¡ datacenter ¡that ¡prevents ¡us ¡from ¡ meeRng ¡our ¡goals? ¡

slide-32
SLIDE 32

Rewrite ¡from ¡Scratch ¡

Not ¡everything ¡is ¡cloud ¡specific ¡ Pay ¡down ¡technical ¡debt ¡ Robust ¡pa?erns ¡

slide-33
SLIDE 33

Old ¡Datacenter ¡vs. ¡New ¡Cloud ¡Arch ¡

Central ¡SQL ¡Database ¡

Distributed ¡Key/Value ¡NoSQL ¡

SRcky ¡In-­‑Memory ¡Session ¡

Shared ¡Memcached ¡Session ¡

Cha?y ¡Protocols ¡

Latency ¡Tolerant ¡Protocols ¡

Tangled ¡Service ¡Interfaces ¡

Layered ¡Service ¡Interfaces ¡

Instrumented ¡Code ¡

Instrumented ¡Service ¡Pa?erns ¡

Fat ¡Complex ¡Objects ¡

Lightweight ¡Serializable ¡Objects ¡

Components ¡as ¡Jar ¡Files ¡

Components ¡as ¡Services ¡

slide-34
SLIDE 34

The ¡Central ¡SQL ¡Database ¡

  • Datacenter ¡has ¡a ¡central ¡database ¡

– Everything ¡in ¡one ¡place ¡is ¡convenient ¡unRl ¡it ¡fails ¡ – Customers, ¡movies, ¡history, ¡configuraRon ¡

  • Schema ¡changes ¡require ¡downRme ¡

AnA-­‑paTern ¡impacts ¡scalability, ¡availability ¡

slide-35
SLIDE 35

The ¡Distributed ¡Key-­‑Value ¡Store ¡

  • Cloud ¡has ¡many ¡key-­‑value ¡data ¡stores ¡

– More ¡complex ¡to ¡keep ¡track ¡of, ¡do ¡backups ¡etc. ¡ – Each ¡store ¡is ¡much ¡simpler ¡to ¡administer ¡ – Joins ¡take ¡place ¡in ¡java ¡code ¡

  • No ¡schema ¡to ¡change, ¡no ¡scheduled ¡downRme ¡
  • Latency ¡for ¡Memcached ¡vs. ¡Oracle ¡vs. ¡SimpleDB ¡

– Memcached ¡is ¡dominated ¡by ¡network ¡latency ¡<1ms ¡ – Oracle ¡for ¡simple ¡queries ¡is ¡a ¡few ¡milliseconds ¡ – SimpleDB ¡has ¡replicaRon ¡and ¡REST ¡overheads ¡>10ms ¡

DBA ¡

slide-36
SLIDE 36

The ¡SRcky ¡Session ¡

  • Datacenter ¡SRcky ¡Load ¡Balancing ¡

– Efficient ¡caching ¡for ¡low ¡latency ¡ – Tricky ¡session ¡handling ¡code ¡ – Middle ¡Rer ¡load ¡balancer ¡has ¡issues ¡in ¡pracRce ¡

  • Encourages ¡concentrated ¡funcRonality ¡

– one ¡service ¡that ¡does ¡everything ¡

AnA-­‑paTern ¡impacts ¡producAvity, ¡availability ¡

slide-37
SLIDE 37

The ¡Shared ¡Session ¡

  • Cloud ¡Uses ¡Round-­‑Robin ¡Load ¡Balancing ¡

– Simple ¡request-­‑based ¡code ¡ – External ¡shared ¡caching ¡with ¡memcached ¡

  • More ¡flexible ¡fine ¡grain ¡services ¡

– Works ¡be?er ¡with ¡auto-­‑scaled ¡instance ¡counts ¡

slide-38
SLIDE 38

Cha?y ¡Opaque ¡and ¡Bri?le ¡Protocols ¡

  • Datacenter ¡service ¡protocols ¡

– Assumed ¡low ¡latency ¡for ¡many ¡simple ¡requests ¡

  • Based ¡on ¡serializing ¡exisRng ¡java ¡objects ¡

– Inefficient ¡formats ¡ – IncompaRble ¡when ¡definiRons ¡change ¡

AnA-­‑paTern ¡causes ¡producAvity, ¡latency ¡and ¡ availability ¡issues ¡

slide-39
SLIDE 39

Robust ¡and ¡Flexible ¡Protocols ¡

  • Cloud ¡service ¡protocols ¡

– JSR311/Jersey ¡is ¡used ¡for ¡REST/HTTP ¡service ¡calls ¡ – Custom ¡client ¡code ¡includes ¡service ¡discovery ¡ – Support ¡complex ¡data ¡types ¡in ¡a ¡single ¡request ¡

  • Apache ¡Avro ¡

– Evolved ¡from ¡Protocol ¡Buffers ¡and ¡Thri: ¡ – Includes ¡JSON ¡header ¡defining ¡key/value ¡protocol ¡ – Avro ¡serializaRon ¡is ¡half ¡the ¡size ¡and ¡several ¡Rmes ¡ faster ¡than ¡Java ¡serializaRon, ¡more ¡work ¡to ¡code ¡

slide-40
SLIDE 40

Persisted ¡Protocols ¡

  • Persist ¡Avro ¡in ¡Memcached ¡

– Save ¡space/latency ¡(zigzag ¡encoding, ¡half ¡the ¡size) ¡ – Less ¡bri?le ¡across ¡versions ¡ – New ¡keys ¡are ¡ignored ¡ – Missing ¡keys ¡are ¡handled ¡cleanly ¡

  • Avro ¡protocol ¡definiRons ¡

– Can ¡be ¡wri?en ¡in ¡JSON ¡or ¡generated ¡from ¡POJOs ¡ – It’s ¡hard, ¡needs ¡be?er ¡tooling ¡

slide-41
SLIDE 41

Tangled ¡Service ¡Interfaces ¡

  • Datacenter ¡implementaRon ¡is ¡exposed ¡

– Oracle ¡SQL ¡queries ¡mixed ¡into ¡business ¡logic ¡

  • Tangled ¡code ¡

– Deep ¡dependencies, ¡false ¡sharing ¡

  • Data ¡providers ¡with ¡sideways ¡dependencies ¡

– Everything ¡depends ¡on ¡everything ¡else ¡

AnA-­‑paTern ¡affects ¡producAvity, ¡availability ¡

slide-42
SLIDE 42

Untangled ¡Service ¡Interfaces ¡

  • New ¡Cloud ¡Code ¡With ¡Strict ¡Layering ¡

– Compile ¡against ¡interface ¡jar ¡ – Can ¡use ¡spring ¡runRme ¡binding ¡to ¡enforce ¡

  • Service ¡interface ¡is ¡the ¡service ¡

– ImplementaRon ¡is ¡completely ¡hidden ¡ – Can ¡be ¡implemented ¡locally ¡or ¡remotely ¡ – ImplementaRon ¡can ¡evolve ¡independently ¡

slide-43
SLIDE 43

Untangled ¡Service ¡Interfaces ¡

Two ¡layers: ¡

  • SAL ¡-­‑ ¡Service ¡Access ¡Library ¡

– Basic ¡serializaRon ¡and ¡error ¡handling ¡ – REST ¡or ¡POJO’s ¡defined ¡by ¡data ¡provider ¡

  • ESL ¡-­‑ ¡Extended ¡Service ¡Library ¡

– Caching, ¡conveniences ¡ – Can ¡combine ¡several ¡SALs ¡ – Exposes ¡faceted ¡type ¡system ¡(described ¡later) ¡ – Interface ¡defined ¡by ¡data ¡consumer ¡in ¡many ¡cases ¡

slide-44
SLIDE 44

Service ¡InteracRon ¡Pa?ern ¡

Swimlane ¡Diagram ¡

slide-45
SLIDE 45

Service ¡Architecture ¡Pa?erns ¡

  • Internal ¡Interfaces ¡Between ¡Services ¡

– Common ¡pa?erns ¡as ¡templates ¡ – Highly ¡instrumented, ¡observable, ¡analyRcs ¡ – Service ¡Level ¡Agreements ¡– ¡SLAs ¡

  • Library ¡templates ¡for ¡generic ¡features ¡

– Instrumented ¡Ne#lix ¡Base ¡Servlet ¡template ¡ – Instrumented ¡generic ¡client ¡interface ¡template ¡ – Instrumented ¡S3, ¡SimpleDB, ¡Memcached ¡clients ¡

slide-46
SLIDE 46

Service ¡Request ¡ Instruments ¡Every ¡ Step ¡in ¡the ¡call ¡

CLIENT ¡ Request ¡Start ¡ Timestamp, ¡ Request ¡End ¡ Timestamp ¡ Client ¡

  • utbound ¡

serialize ¡start ¡ Rmestamp ¡ Client ¡

  • utbound ¡

serialize ¡end ¡ Rmestamp ¡ Client ¡Network ¡ send ¡ Rmestamp ¡ Service ¡ Network ¡ receive ¡ Rmestamp ¡ Service ¡ inbound ¡ serialize ¡start ¡ Rmestamp ¡ Service ¡ inbound ¡ serialize ¡end ¡ Rmestamp ¡ SERVICE ¡execute ¡ request ¡start ¡ Rmestamp, ¡ execute ¡request ¡ end ¡Rmestamp ¡ Service ¡

  • utbound ¡

serialize ¡start ¡ Rmestamp ¡ Service ¡

  • utbound ¡

serialize ¡end ¡ Rmestamp ¡ Service ¡ network ¡send ¡ Rmestamp ¡ Client ¡network ¡ receive ¡ Rmestamp ¡ Inbound ¡ deserialize ¡ start ¡ Rmestamp ¡ Inbound ¡ deserialize ¡end ¡ Rmestamp ¡

slide-47
SLIDE 47

Boundary ¡Interfaces ¡

  • Isolate ¡teams ¡from ¡external ¡dependencies ¡

– Fake ¡SAL ¡built ¡by ¡cloud ¡team ¡ – Real ¡SAL ¡provided ¡by ¡data ¡provider ¡team ¡later ¡ – ESL ¡built ¡by ¡cloud ¡team ¡using ¡faceted ¡objects ¡

  • Fake ¡data ¡sources ¡allow ¡development ¡to ¡start ¡

– e.g. ¡Fake ¡IdenRty ¡SAL ¡for ¡a ¡test ¡set ¡of ¡customers ¡ – Development ¡solidifies ¡dependencies ¡early ¡ – Helps ¡external ¡team ¡provide ¡the ¡right ¡interface ¡

slide-48
SLIDE 48

One ¡Object ¡That ¡Does ¡Everything ¡

  • Datacenter ¡uses ¡a ¡few ¡big ¡complex ¡objects ¡

– Movie ¡and ¡Customer ¡objects ¡are ¡the ¡foundaRon ¡ – Good ¡choice ¡for ¡a ¡small ¡team ¡and ¡one ¡instance ¡ – ProblemaRc ¡for ¡large ¡teams ¡and ¡many ¡instances ¡

  • False ¡sharing ¡causes ¡tangled ¡dependencies ¡

– UnproducRve ¡re-­‑integraRon ¡work ¡

AnA-­‑paTern ¡impacAng ¡producAvity ¡and ¡ availability ¡

slide-49
SLIDE 49

An ¡Interface ¡For ¡Each ¡Component ¡

  • Cloud ¡uses ¡faceted ¡Video ¡and ¡Visitor ¡

– Basic ¡types ¡hold ¡only ¡the ¡idenRfier ¡ – Facets ¡scope ¡the ¡interface ¡you ¡actually ¡need ¡ – Each ¡component ¡can ¡define ¡its ¡own ¡facets ¡

  • No ¡false-­‑sharing ¡and ¡dependency ¡chains ¡

– Type ¡manager ¡converts ¡between ¡facets ¡as ¡needed ¡ – video.asA(PresentaRonVideo) ¡for ¡www ¡ – video.asA(MerchableVideo) ¡for ¡middle ¡Rer ¡

slide-50
SLIDE 50

So:ware ¡Architecture ¡Pa?erns ¡

  • Object ¡Models ¡

– Basic ¡and ¡derived ¡types, ¡facets, ¡serializable ¡ – Pass ¡by ¡reference ¡within ¡a ¡service ¡ – Pass ¡by ¡value ¡between ¡services ¡

  • ComputaRon ¡and ¡I/O ¡Models ¡

– Service ¡ExecuRon ¡using ¡Best ¡Effort ¡ – Common ¡thread ¡pool ¡management ¡

slide-51
SLIDE 51

Ne#lix ¡Systems ¡Architecture ¡

slide-52
SLIDE 52

Front ¡End ¡ELB ¡ API ¡Proxy ¡ API ¡ELB ¡ Discovery ¡ Service ¡ API ¡ AWS ¡EC2 ¡ Ne@lix ¡ Data ¡Center ¡

memcached ¡

S3 ¡ Oracl e ¡ SQS ¡ EBS ¡ Component ¡ Services ¡ AWS ¡Storage ¡ SimpleDB ¡

memcached ¡

API ¡

Oracle ¡ Oracle ¡ API ¡etc. ¡

ReplicaRon ¡

slide-53
SLIDE 53

Ne#lix ¡UndifferenRated ¡Li:ing ¡

  • Middle ¡Tier ¡Load ¡

Balancing ¡

  • Discovery ¡(local ¡DNS) ¡
  • EncrypRon ¡Services ¡
  • Caching ¡
  • Distributed ¡App ¡

Management ¡

We ¡want ¡cloud ¡vendors ¡to ¡do ¡all ¡this ¡for ¡us ¡as ¡well! ¡

slide-54
SLIDE 54

Load ¡Balancing ¡in ¡AWS ¡

  • Middle ¡Rer ¡currently ¡not ¡supported ¡in ¡AWS ¡

– ELB ¡are ¡public-­‑facing ¡only ¡ – Cannot ¡apply ¡security ¡group ¡sezngs ¡

  • ELB ¡verRcal ¡scalability ¡for ¡concentrated ¡clients ¡

– Too ¡few ¡proxy ¡IP ¡addresses ¡leads ¡to ¡hot ¡spots ¡

  • ELB ¡needs ¡support ¡for ¡balancing ¡heurisRcs ¡

– ProporRonal ¡balance ¡across ¡Availability ¡Zones ¡ – Weighted ¡Least ¡connecRons, ¡Weighted ¡Round ¡Robin ¡

  • Zone ¡aware ¡rouRng ¡

– Default ¡to ¡instances ¡in ¡the ¡same ¡Availability ¡Zone ¡ – Falls ¡back ¡to ¡cross-­‑zone ¡on ¡failure ¡

slide-55
SLIDE 55

Discovery ¡

  • Discovery ¡Service ¡(Redundant ¡instances ¡per ¡zone) ¡

– Simple ¡REST ¡interface ¡ – Cloud ¡apps ¡register ¡with ¡Discovery ¡

  • Apps ¡send ¡heartbeats ¡every ¡30 ¡sec ¡to ¡renew ¡lease ¡

– App ¡evicted ¡a:er ¡3 ¡missed ¡heartbeats ¡ – Can ¡re-­‑register ¡if ¡the ¡problem ¡was ¡transient ¡

  • Apps ¡can ¡store ¡custom ¡metadata ¡

– Version ¡number, ¡AMI ¡id, ¡Availability ¡Zone, ¡etc. ¡

  • So:ware ¡Round-­‑robin ¡Load ¡Balancer ¡

– Query ¡Discovery ¡for ¡instances ¡of ¡specific ¡applicaRon ¡ – Baked ¡into ¡Ne#lix ¡REST ¡client ¡(JSR311/Jersey ¡based) ¡ AWS ¡Middle-­‑)er ¡ELB ¡would ¡eliminate ¡most ¡use ¡cases ¡

slide-56
SLIDE 56

Database ¡MigraRon ¡

  • Why ¡SimpleDB? ¡

– No ¡DBA’s ¡in ¡the ¡cloud, ¡Amazon ¡hosted ¡service ¡ – Work ¡started ¡two ¡years ¡ago, ¡fewer ¡viable ¡opRons ¡ – Worked ¡with ¡Amazon ¡to ¡speed ¡up ¡and ¡scale ¡SimpleDB ¡

  • AlternaRves? ¡

– InvesRgaRng ¡adding ¡Cassandra ¡and ¡Membase ¡to ¡the ¡mix ¡ – Need ¡several ¡opRons ¡to ¡match ¡use ¡cases ¡well ¡

  • Detailed ¡SimpleDB ¡Advice ¡

– Sid ¡Anand ¡ ¡-­‑ ¡QConSF ¡Nov ¡5th ¡– ¡Ne#lix’ ¡TransiRon ¡to ¡High ¡ Availability ¡Storage ¡Systems ¡ – Blog ¡-­‑ ¡h?p://pracRcalcloudcompuRng.com/ ¡ – Download ¡Paper ¡PDF ¡-­‑ ¡h?p://bit.ly/bhOTLu ¡

slide-57
SLIDE 57

Tools ¡and ¡AutomaRon ¡

  • Developer ¡and ¡Build ¡Tools ¡

– Jira, ¡Eclipse, ¡Hudson, ¡Ivy, ¡ArRfactory ¡ – Builds, ¡creates ¡.war ¡file, ¡.rpm, ¡bakes ¡AMI ¡and ¡launches ¡

  • Custom ¡Ne#lix ¡ApplicaRon ¡Console ¡

– AWS ¡Features ¡at ¡Enterprise ¡Scale ¡(hide ¡the ¡keys!) ¡ – Auto ¡Scaler ¡Group ¡is ¡unit ¡of ¡deployment ¡to ¡producRon ¡

  • Open ¡Source ¡+ ¡Support ¡

– Apache, ¡Tomcat, ¡OpenJDK, ¡CentOS ¡

  • Monitoring ¡Tools ¡

– Keynote ¡– ¡service ¡monitoring ¡and ¡alerRng ¡ – AppDynamics ¡– ¡Developer ¡focus ¡for ¡cloud ¡ – EpicNMS ¡– ¡flexible ¡data ¡collecRon ¡and ¡plots ¡h?p://epicnms.com ¡ – Nimso: ¡NMS ¡– ¡ITOps ¡focus ¡for ¡Datacenter ¡+ ¡Cloud ¡alerRng ¡

slide-58
SLIDE 58

Current ¡Status ¡

slide-59
SLIDE 59

WWW ¡Page ¡by ¡Page ¡during ¡Q2/Q3/Q4 ¡

  • Simplest ¡possible ¡page ¡first ¡

– Minimal ¡dependencies ¡

  • Add ¡pages ¡as ¡dependent ¡services ¡come ¡online ¡
  • Home ¡page ¡– ¡most ¡complex ¡and ¡highest ¡traffic ¡
  • Leave ¡low ¡traffic ¡pages ¡for ¡later ¡cleanup ¡

gradual ¡migraAon ¡from ¡Datacenter ¡pages ¡

slide-60
SLIDE 60

Big-­‑Bang ¡TransiRon ¡

  • iPhone ¡Launch ¡(August/Sept) ¡

– No ¡capacity ¡in ¡the ¡datacenter, ¡cloud ¡only ¡ – App ¡Store ¡gates ¡release, ¡not ¡gradual, ¡can’t ¡back ¡out ¡ – Market ¡is ¡huge ¡(exisRng ¡and ¡new ¡customers) ¡ – Has ¡to ¡work ¡at ¡large ¡scale ¡on ¡day ¡one ¡

  • Datacenter ¡Shadow ¡Redirect ¡Technique ¡

– Used ¡to ¡stress ¡back-­‑end ¡and ¡data ¡sources ¡

  • SOASTA ¡Cloud ¡Based ¡Load ¡GeneraRon ¡

– Used ¡to ¡stress ¡test ¡API ¡and ¡end-­‑to-­‑end ¡funcRonality ¡

slide-61
SLIDE 61

Current ¡Work ¡for ¡Cloud ¡Pla#orm ¡

  • Drive ¡latency ¡and ¡availability ¡goals ¡

– More ¡Aggressive ¡caching ¡ – Fault ¡and ¡latency ¡robustness ¡

  • Logging ¡and ¡monitoring ¡portal/dashboards ¡

– Working ¡to ¡integrate ¡tools ¡and ¡data ¡sources ¡ – Need ¡be?er ¡observability ¡and ¡automaRon ¡

  • EvaluaRng ¡a ¡range ¡of ¡NoSQL ¡choices ¡

– Broad ¡set ¡of ¡use ¡cases, ¡no ¡single ¡winner ¡ – Good ¡topic ¡for ¡another ¡talk… ¡

slide-62
SLIDE 62

Wrap ¡Up ¡

slide-63
SLIDE 63

Next ¡Few ¡Years… ¡

  • “System ¡of ¡Record” ¡moves ¡to ¡Cloud ¡

– Master ¡copies ¡of ¡data ¡live ¡only ¡in ¡the ¡cloud, ¡with ¡backups ¡etc. ¡ – Cut ¡the ¡datacenter ¡to ¡cloud ¡replicaRon ¡link ¡

  • InternaRonal ¡Expansion ¡– ¡Global ¡Clouds ¡

– Rapid ¡deployments ¡to ¡new ¡markets ¡

  • GPU ¡Clouds ¡opRmized ¡for ¡video ¡encoding ¡
  • Cloud ¡StandardizaRon ¡

– Cloud ¡features ¡and ¡APIs ¡should ¡be ¡a ¡commodity ¡not ¡a ¡differenRator ¡ – DifferenRate ¡on ¡scale ¡and ¡quality ¡of ¡service ¡ – CompeRRon ¡also ¡drives ¡cost ¡down ¡ – Higher ¡resilience ¡ – Higher ¡scalability ¡

We ¡would ¡prefer ¡to ¡be ¡an ¡insignificant ¡customer ¡in ¡a ¡giant ¡cloud ¡

slide-64
SLIDE 64

Remember ¡the ¡Goals ¡

Faster ¡ Scalable ¡ Available ¡ ProducRve ¡

Track ¡progress ¡against ¡these ¡goals ¡

slide-65
SLIDE 65

Takeaway ¡

Ne9lix ¡is ¡path-­‑finding ¡the ¡use ¡of ¡public ¡AWS ¡ cloud ¡to ¡replace ¡in-­‑house ¡IT ¡for ¡non-­‑trivial ¡ applicaAons ¡with ¡hundreds ¡of ¡developers ¡and ¡ thousands ¡of ¡systems. ¡

h?p://www.linkedin.com/in/adriancockcro: ¡ @adrianco ¡#ne#lixcloud ¡ acockcro:@ne#lix.com ¡