couchbase_uk_2013_skyscanner_and_couchbase

34
Sunday 3 July 2022 Couchbase at Skyscanner

Upload: couchbase

Post on 31-May-2015

1.064 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Couchbase_UK_2013_Skyscanner_and_Couchbase

12 April 2023

Couchbase at Skyscanner

Page 2: Couchbase_UK_2013_Skyscanner_and_Couchbase

Who are Skyscanner?

Page 3: Couchbase_UK_2013_Skyscanner_and_Couchbase

Edinburgh

Page 4: Couchbase_UK_2013_Skyscanner_and_Couchbase

website apps

traditional

mobile site

OTAsbudgetbudget

Page 5: Couchbase_UK_2013_Skyscanner_and_Couchbase
Page 6: Couchbase_UK_2013_Skyscanner_and_Couchbase

How does Skyscanner work?

Page 7: Couchbase_UK_2013_Skyscanner_and_Couchbase

budget

Live Pricing Service

Browse Cache

Service

Page 8: Couchbase_UK_2013_Skyscanner_and_Couchbase

A route-date specific search

Page 9: Couchbase_UK_2013_Skyscanner_and_Couchbase

The end result

Page 10: Couchbase_UK_2013_Skyscanner_and_Couchbase

Powering a live pricing search

Prices +Timetables

Data Collection Services

1) Which websites should we show?

2) What prices do we already have

cached?

3) Live update what we still

need. 4) Clean up and save the new data

5) Return the prices to the user.

Live Pricing Service

Page 11: Couchbase_UK_2013_Skyscanner_and_Couchbase

Scaling the live pricing cache

Page 12: Couchbase_UK_2013_Skyscanner_and_Couchbase

The original solution

Price Cache

Live Pricing Service

Page 13: Couchbase_UK_2013_Skyscanner_and_Couchbase

Solution 1 – Split up Reads and Writes

Read Only Cache, writing queues of new data

Quote Processors

Replication

Live Pricing Service

Page 14: Couchbase_UK_2013_Skyscanner_and_Couchbase

Solution 2 – A temporary local cache

Live Pricing Service

Cached Prices (key/value)

Page 15: Couchbase_UK_2013_Skyscanner_and_Couchbase

At this scale

2 bn itineraries and quotes

270 GB

table

250 GB

indices

2000 quotes per second

Page 16: Couchbase_UK_2013_Skyscanner_and_Couchbase

What we really needed

Consistency

Persistence

Speed

Resilience

Horizontal Scaling

Elasticity

Simplicity

Page 17: Couchbase_UK_2013_Skyscanner_and_Couchbase

Solution 3 – Introduce Couchbase

Live Pricing Service

Legacy read-only cache

Legacy quote Processors

Page 18: Couchbase_UK_2013_Skyscanner_and_Couchbase

The Documents

struct TransportQuoteSet {    1: string MarketingAgentId,    2: common.PassengerGroup PassengerGroup,    3: i32 OutboundDate,    4: bool OneWay,    5: optional i32 InboundDate,    6: common.Place OriginPlace,    7: common.Place DestinationPlace,    8: common.Combinability Combinability,    9: bool Comprehensive    10: list<TransportQuote> Quotes,    11: list<ChildTransportQuoteSet> ChildTransportQuoteSets,    12: optional i32 UtcQuoteDateTime    13: optional bool Additional     14: optional string CabinClass}

Page 19: Couchbase_UK_2013_Skyscanner_and_Couchbase

The actual cluster

Page 20: Couchbase_UK_2013_Skyscanner_and_Couchbase

The buckets

Page 21: Couchbase_UK_2013_Skyscanner_and_Couchbase

The quotes bucket

Page 22: Couchbase_UK_2013_Skyscanner_and_Couchbase

Some specifics on the setup

Dedicated 6 servers:

SSDs

1 replica of data

Taking nodes in and out of the cluster

Performance with multiple buckets

Monitoring and reporting in one place

2 x Quad core Intel i7 2.0ghz

256GB of 1600mhz RAM

Dell R620 1U.

Centos 6.2

3 x 600gb MLC SSD each (Raid1 + Hot spare)

Page 23: Couchbase_UK_2013_Skyscanner_and_Couchbase

Going beyond a cache.

Page 24: Couchbase_UK_2013_Skyscanner_and_Couchbase
Page 25: Couchbase_UK_2013_Skyscanner_and_Couchbase

Running a car hire search

Prices + Reference Data

Data Collection Services

1) Which websites should we show?

2) What prices do we already have

cached?

3) Live update what we still

need. 4) Save and enrich the new data

5) Return the prices to the user.

Car Hire Live Pricing Service

Page 26: Couchbase_UK_2013_Skyscanner_and_Couchbase

Reference Data

Supplier-Location

Map reduce views

python Couchbase 2.0 client lib

Car Codes {  "website": {    "published": true,    "id": "affd", ...  },  "office_id": "1",  "city_id": "AUHA",  "raw_data": [...]  "address":   "closing_time": "00:00",  "routenodeid": "9618",  "type": "office“}

Page 27: Couchbase_UK_2013_Skyscanner_and_Couchbase

Price Data

Python Smart Client Isn’t Ready, so…

Page 28: Couchbase_UK_2013_Skyscanner_and_Couchbase

Cluster Info

3 nodes

Virtual

Benched to 1000+ ops/sec

SASL Auth.

Page 29: Couchbase_UK_2013_Skyscanner_and_Couchbase

What’s next?

Page 30: Couchbase_UK_2013_Skyscanner_and_Couchbase

A flexible search

Page 31: Couchbase_UK_2013_Skyscanner_and_Couchbase

The results.

Page 32: Couchbase_UK_2013_Skyscanner_and_Couchbase

What has Couchbase brought us?

Page 33: Couchbase_UK_2013_Skyscanner_and_Couchbase
Page 34: Couchbase_UK_2013_Skyscanner_and_Couchbase

quartermile one15 lauriston placeedinburgh eh3 9en

tel: +44 (0)131 252 5353fax: +44 (0)131 252 5354

twitter: @skyscannerfacebook: skyscanner

Thank you for listening.

Alistair [email protected]