couchbase_uk_2013_betfair_and_couchbase

38
BETFAIR + COUCHBASE Martin Anderson

Upload: couchbase

Post on 10-May-2015

2.590 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Couchbase_UK_2013_Betfair_and_Couchbase

BETFAIR + COUCHBASE

Martin Anderson

Page 2: Couchbase_UK_2013_Betfair_and_Couchbase

AGENDA

2

• Who Betfair are• Why Couchbase was chosen at Betfair• What it is being used for• Some thoughts on adopting NoSQL in Enterprises• Q&A session later on today

Page 3: Couchbase_UK_2013_Betfair_and_Couchbase

BETFAIR

3

Page 4: Couchbase_UK_2013_Betfair_and_Couchbase

4

Page 5: Couchbase_UK_2013_Betfair_and_Couchbase

THE EXCHANGE

5

Page 6: Couchbase_UK_2013_Betfair_and_Couchbase

IN NUMBERS

6

4.0m+Funded

Accounts

140locations

30,000bets placed one minute

120,000+ requests

per second

£288m funds on deposit

£2.2bnMobile FY12

Page 7: Couchbase_UK_2013_Betfair_and_Couchbase

DATA AT BETFAIR

7

Page 8: Couchbase_UK_2013_Betfair_and_Couchbase

DATA AT BETFAIR

8

• >30,000 markets that can change every 100ms• Jurisdictionally sensitive navigation• Multiple web applications for multiple channels• Large volumes of data from other products• Transactional data• Operational monitoring too - large amount of logging data

Page 9: Couchbase_UK_2013_Betfair_and_Couchbase

TECHNOLOGY AT BETFAIR

9

Application Stack• JVM heavy• Linux on commodity hardware• Heavy use of Virtualisation/Private Cloud

Data Storage Stack• Oracle• Some Informix & MySQL• NoSQL

Page 10: Couchbase_UK_2013_Betfair_and_Couchbase

RELATIONAL DATABASES

10

We love Oracle!The lifeblood of our transaction systemHighly performantWell understoodResilient

Other databases but they are effectively integrated products

Page 11: Couchbase_UK_2013_Betfair_and_Couchbase

BUT…

11

Impedance mismatch with object orientated languagesObject models possible in RDBMS but at what cost?Must have serious skills at this scaleScaling not easyOften very heavyweight solutionIntegration with Continuous Delivery?

So what about NoSQL?

Page 12: Couchbase_UK_2013_Betfair_and_Couchbase

NOSQL AT BETFAIR

12

Page 13: Couchbase_UK_2013_Betfair_and_Couchbase

NOSQL

13

Matches well to object orientated languagesInherently scalableVery fast look upsIntegrates very well with Continuous DeliveryCombines to give a lower time to delivery

Page 14: Couchbase_UK_2013_Betfair_and_Couchbase

NOSQL AT BETFAIR

14

Page 15: Couchbase_UK_2013_Betfair_and_Couchbase

WHY SO MANY?

15

Different categories of NoSQL, therefore different usage: K/V, Document, Columnar

Some are wrapped by other products• CouchDB & Chef• HBase & OpenTSDB

But what about cases where we have direct usage?What was the selection criteria for these solutions?

Page 16: Couchbase_UK_2013_Betfair_and_Couchbase

THE PRESSURE OF DELIVERY

16

Just finished a cycle of high product delivery focusTime to step back and reassess the selections

But without negatively affecting current product delivery!

Page 17: Couchbase_UK_2013_Betfair_and_Couchbase

STRATEGIC REVIEW

17

Good NewsWe had a fair amount of experience with different NoSQL solutions

Bad NewsFairly certain that some of the uses were less than optimal

Page 18: Couchbase_UK_2013_Betfair_and_Couchbase

ADOPTION AND ASSESSMENT PROCESS

18

• What were our use cases?

• What would be the optimum solutions?

Page 19: Couchbase_UK_2013_Betfair_and_Couchbase

NOSQL ASSESSMENT PROCESS

19

• Background/Maturity of the technology• Data Model Category• Consistency Model Requirements• Performance• Replication strategy (inc. Concurrency Control)• Caching Model• Query Model• Integration with Continuous Delivery

Page 20: Couchbase_UK_2013_Betfair_and_Couchbase

NOSQL ASSESSMENT PROCESS

20

• Operational Maintenance (inc. Backup)• Operational Monitoring• Support• Scalability• Reliability• Security• Cost

Page 21: Couchbase_UK_2013_Betfair_and_Couchbase

INITIAL USE CASES FOR NOSQL

21

Web Tier Persistence• Session and Cross session storage – e.g. Betslip• Memcached• Strong consistency• Cookie abuse• Cassandra as current solution

Page 22: Couchbase_UK_2013_Betfair_and_Couchbase

INITIAL USE CASES FOR NOSQL

22

User Preferences• Historically tied to customer account • Map of keys and values• Multiple channels with multiple applications• RDBMS as current solution

Page 23: Couchbase_UK_2013_Betfair_and_Couchbase

CURRENT ARCHITECTURE

23

Server side rendered contentSOA Data Services exposedSupports >200,000 concurrent users

Page 24: Couchbase_UK_2013_Betfair_and_Couchbase

WEB APPLICATION CALL STRUCTURE

24

Page 25: Couchbase_UK_2013_Betfair_and_Couchbase

OUR SELECTION CRITERIA

25

• Performance - especially deterministic performance on VMs• Strong consistency• Scaling• Schema flexibility• Multi-tenancy when required• Simplicity• Enterprise support• Consider the future uses

Page 26: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE

26

Page 27: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE PERFORMANCE

27

• Seriously fast• Highly deterministic• Cache ejection/eviction• Avoids Cold Cache on offlined instances• Ideal for our architecture – virtualisation/private cloud• Far better option than our current solution

Page 28: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE SCALING

28

• Inherently scalable• Impressive ability to add nodes under load• Manual rebalance gives control for highly loaded applications• Replica promotion avoids failure cascades under load

Page 29: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE SCHEMA FLEXIBILITY

29

• Giving the developers ownership of the data storage• Decouples data migration from application deployment• Important requirement for Feature Throttles• Removes many of the requirements for having DB devs/DBAs• Allows preferences to deal with A/B tests

Page 30: Couchbase_UK_2013_Betfair_and_Couchbase

OTHER COUCHBASE FEATURES

30

• Multi-tenancy when required• Stable and Resilient• Great ease of use for both Devs and Ops• Enterprise support• Elastic Search integration• Secured with a Service Layer

Page 31: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE IN CONTINUOUS DELIVERY

31

Page 32: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE DEPLOYMENTS

32

• Version 1.8 in production, some 2.0 in pre-prod• 3 instance clusters for individual web applications• Larger (4-6) instance clusters for service storage

• We are about 6 months in with our production instances

Page 33: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE IN PRODUCTION

33

Page 34: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE IN PRODUCTION

34

Page 35: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE IN PRODUCTION

35

Page 36: Couchbase_UK_2013_Betfair_and_Couchbase

COUCHBASE AT BETFAIR

36

Couchbase is now our strategic document NoSQL solution• Session state• Cross session state• Service Persistence for key-based Entities

• Familiarity will likely see this extend out into other areas

Page 37: Couchbase_UK_2013_Betfair_and_Couchbase

INTRODUCING NOSQL IN ENTERPRISE AKA CULTURE HACKING WITH NOSQL

37

• Remember it's an umbrella term - non-experts will ask why we need so many different types of NoSQL

• Remember the business benefits• Present the business with both the use cases you want to adopt NoSQL

for and the assessment of the candidates• When you can use it, get it out there ASAP in a low risk way• It’s not about choosing what’s cool, it’s about choosing what’s best for

the business

Page 38: Couchbase_UK_2013_Betfair_and_Couchbase

THANK YOU!

Martin Anderson @mdjanderson

38

http://betfair.jobs