couchbase_uk_2013_betfair_and_couchbase

Post on 10-May-2015

2.590 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

BETFAIR + COUCHBASE

Martin Anderson

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

BETFAIR

3

4

THE EXCHANGE

5

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

DATA AT BETFAIR

7

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

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

RELATIONAL DATABASES

10

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

Other databases but they are effectively integrated products

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?

NOSQL AT BETFAIR

12

NOSQL

13

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

NOSQL AT BETFAIR

14

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?

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!

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

ADOPTION AND ASSESSMENT PROCESS

18

• What were our use cases?

• What would be the optimum solutions?

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

NOSQL ASSESSMENT PROCESS

20

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

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

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

CURRENT ARCHITECTURE

23

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

WEB APPLICATION CALL STRUCTURE

24

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

COUCHBASE

26

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

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

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

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

COUCHBASE IN CONTINUOUS DELIVERY

31

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

COUCHBASE IN PRODUCTION

33

COUCHBASE IN PRODUCTION

34

COUCHBASE IN PRODUCTION

35

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

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

THANK YOU!

Martin Anderson @mdjanderson

38

http://betfair.jobs

top related