Top Banner
COUCHBASE AT THE HUT GROUP Chris Woods – Architect @ The Hut Group
18
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: CCB12 Couchbase at The Hut Group

COUCHBASE AT THE HUT GROUP

Chris Woods – Architect @ The Hut Group

Page 2: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

About

About Me

Name: Chris Woods

Role: Architect

Contact: [email protected]

@chriswoods1983

About The Hut Group

The Hut Group is the UK’s leading multi-website online retailer with operations

in the women's fashion, health & beauty, entertainment and gifts market. The

group has also firmly established itself in multiple international markets, with

35% of current sales coming from outside the UK.

Page 3: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Background

• Server bound: Whenever we deployed our existing application, all

the customers currently on the site get kicked out of the ”checkout

flow”, making it costly to release and consequently restricts when

and how often you can release. • Not resilient: If the server you are bound to via sticky session goes

down customer gets kicked out of checkout. • Costly to scale: very difficult to scale out across data centres.

Page 4: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Background

Ecommerce Platform

SQL Server

Payment Processing

ServiceDelivery Options

Service

Backend

Page 5: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

The Future

Requirements

• Be capable of supporting 4,000 concurrent sessions per min at a sustained rate during “peak”.

• Should be able to release the system at any time of day and not affect the user experience.

• Grows with the company - can be expanded to support 1,000 to 10,000 times more traffic.

• Can be scaled across multiple data centres in multiple physical locations.

• In case of failover should not cause downtime.

• Improve customer dropout rates (single page).

Page 6: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

The Contenders

Page 7: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

The Contenders

Low Latency Scalable Data Query-able

SQL Server No Hard Hard Yes

Couchbase 1.8 Yes Yes Yes No

Couchbase 2 Yes Yes Yes Yes

Extendable Support

SQL Server Hard Yes

Couchbase 1.8 Yes Yes

Couchbase 2 Yes Yes

Page 8: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Couchbase 1.8 Migrate Couchbase 2.0

Features Added •Queryable

• to input in data warehouse• Inter-data centre Replication

• to support service continuality

Zero downtime migration options

Page 9: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

New

Checkout Web Platform

Web App Web API

Couchbase Server

Ecommerce platform

Sql Server

Payment Processing Service

Delivery Options Service

Account ServiceOrder Service

Page 10: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Key Considerations

• Performance.• Availability.• Data storage (serializing and de-serializing).• Segmenting data into buckets.• Code Implementation• Data consistency in an asynchronous, event-driven

environment.• Changing document schema;

• Versioning the document that is stored.

Page 11: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Page 12: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Checkout Web Platform

WebApp

WebAPI

Queue AdaptorDeliveryService

CouchbaseServer

1. 2.

3.

4.

5.

Queue Adaptor

ChannelService

Page 13: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Page 14: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

CAS

Q) How do we keep the checkout session object (which is a serialized JSON document) consistent?

• CAS• Divide and conquer ...• …And if that fails, compare

Note: this is in Couchbase 1.8

Page 15: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Document Storage

Checkout Session:id:123

PaymentDetailsId:123

DeliveryOptionsid:123

Shipping RestrictionsId:123

Page 16: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Success

• Released on 2nd July and has taken over 400,000 orders

• Very few CAS violations, which are gracefully handled when they

do occur.

Page 17: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

What next for Couchbase at The Hut Group

• Local server cache replacement• Tomcat session • Product cache• Special Offer Cache

• Big Data – Speed Layer!

Page 18: CCB12 Couchbase at The Hut Group

CO

UC

HB

AS

E A

T T

HE

HU

T G

RO

UP

Questions

?