moving an e-commerce site to aws. a case study

22
© 2016 CLUSTRIX The First Scale-out SQL Database Engineered for Today’s Cloud Moving the Choxi E-commerce Site to AWS.

Upload: clustrix

Post on 17-Jan-2017

302 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Moving an  E-commerce Site to AWS. A Case Study

© 2016 CLUSTRIX

The First Scale-out SQL Database Engineered for Today’s Cloud

Moving the Choxi E-commerce Site to AWS.

Nick Lamb
I couldn't get this graphic to play nice with the previous slide. It's not the prettiest and I don't really know what the value add is here.
Lisa Schultz
A visual is the value add. Instead of just having text heavy slides. We should definitely add it on the Flex Up/Flex Down slide since that's what they would be doing with this
Page 2: Moving an  E-commerce Site to AWS. A Case Study

Agenda

• Introductions• Choxi and their business goals• Clustrix and the process of moving to AWS• Q&A

2

Page 3: Moving an  E-commerce Site to AWS. A Case Study

Speakers

Keith BusseyVP of Technology, Choxi

3

Nick LambDirector of Consulting Services

Page 4: Moving an  E-commerce Site to AWS. A Case Study

4

Choxi and their business goals

Page 5: Moving an  E-commerce Site to AWS. A Case Study

What is Choxi?

• Choxi.com is the online shopping destination for quality, on-trend, branded and unbranded, in-demand goods at prices ranging from 50%-80% off retail.

• Choxi's efficient business model cuts out the middleman to allow delivery of great products at the lowest possible cost to the consumer.

5

Page 6: Moving an  E-commerce Site to AWS. A Case Study

Choxi Check Out

6

• During the Holiday Season peaks– 1M daily visitors– 4,200 shopping carts per hour – 100,000 purchases a day

Choxi started their site with 8 great deals a day. They now sell over 35,000 products at any one time.

Page 7: Moving an  E-commerce Site to AWS. A Case Study

Choxi and AWS• We had been running the applications and database in a datacenter

– Annual commitments and the need to plan weeks in advance left us with wasted time, resources and expenses.

– And those costs stayed with us after the holiday season ended• We needed a solution that would tie costs to revenues

– Clustrix and AWS give us that flexibility• How Choxi licenses from Clustrix

– Steady run rate is licensed annually– Holiday capacity is licensed monthly

7

Page 8: Moving an  E-commerce Site to AWS. A Case Study

Typical IT Infrastructure

8

Vendor Portal

Replication

Disaster Recovery and Read Only cluster

Analytics and Information

Page 9: Moving an  E-commerce Site to AWS. A Case Study

Preparing for the Holiday Season

• Choxi’s business soars during the holiday season– Choxi Flexed Up to 14 database nodes and 240 web nodes in November

– And they Flex Down back to six nodes DB nodes in January

• Choxi returned to normal use in <10 seconds during each Flex

9

Page 10: Moving an  E-commerce Site to AWS. A Case Study

Moving to AWS

• Choxi has completed to transition to AWS– Database nodes were moved to AWS in August– No downtime. No surprises.

• AWS allows Choxi to scale app servers and database nodes up and down as demand dictates.

10

Page 11: Moving an  E-commerce Site to AWS. A Case Study

11

Clustrix and the process of moving to AWS

Page 12: Moving an  E-commerce Site to AWS. A Case Study

Overview

• Allocating resources for ClustrixDB in AWS• Moving from the Datacenter to AWS• Flex Up / Flex Down for Seasonal Scale

12

Page 13: Moving an  E-commerce Site to AWS. A Case Study

ClustrixDB Setup in AWS

ClustrixDB on AWS Setup Summary• Form Cluster with the ClustrixDB AMI

– Spin up 3 or more nodes with AMI• Implemented in a VPC for Enhanced Networking and better security• c3.2XLarge recommended for most workloads

– Configure AWS Security Group – Cluster Nodes

• Adding nodes for seasonal flex up is the same procedure• Configure ELB (Elastic Load Balancer) for cluster

13

Page 14: Moving an  E-commerce Site to AWS. A Case Study

Backup

• Backup production database– On MySQL: Take a consistent snapshot including master data (binlog

position) with MySQLDump.– On ClustrixDB: ‘Clustrix Fast Backup’. Always consistent, including

binlog position.• Restore backup to AWS cluster

– From MySQL: Clustrix Import. • Parallelizes data import. • MySQL import is serialized.

– From ClustrixDB: Fast Restore

14

Page 15: Moving an  E-commerce Site to AWS. A Case Study

Testing / Verification

• Initial Smoke Test• Query & Compatibility Testing• Load Testing• Failure Testing

15

Page 16: Moving an  E-commerce Site to AWS. A Case Study

Configure Replication

• Configure replication from Existing Database to AWS– MySQL: Information for Slave position in mysqldump– ClustrixDB: Information for Slave in backup metadata file

• Wait for replication to catch up– Time to complete is based on the time/volume between backup

starting and restore/replication set-up completion– Check with `show slave status\G` on ClustrixDB AWS

16

Page 17: Moving an  E-commerce Site to AWS. A Case Study

Optional Best Practices

• Allow for Fallback to Original Cluster in case of Emergency– Setup Master/Master Replication

• AWS Cluster, Master Active• Bare Metal, Master Passive

• Setup Second AWS ClustrixDB Cluster as a Disaster Recovery/Read Slave– Similar process as migration from Existing Database to AWS.

• Best practice is to maintain original database until:– Confirmation of expected Application performance and behavior on

AWS.– Successfully configuration of a DR slave configured in AWS.

(Optional/Recommended)

17

Page 18: Moving an  E-commerce Site to AWS. A Case Study

Go Live on AWS

• Standard Cutover Procedure– Stop Application Writes– Set Existing Database to read_only– Set AWS ClustrixDB Cluster to read/write.– Point Application to ClustrixDB AWS Cluster– Enable writes

• You are live on your AWS ClustrixDB cluster!

18

Page 19: Moving an  E-commerce Site to AWS. A Case Study

Flex Up / Flex Down For Seasonal Scale

• Flex Up– Add multiple nodes with one

short interruption of service– Automatic Distribution of data– New nodes immediately

available for query processing• Flex Down

– Safely remove multiple nodes with one short interruption of service

– Data remains protected during the Flex Down operation

19

Page 20: Moving an  E-commerce Site to AWS. A Case Study

20

Clustrix Resources for AWSPlease visit docs.clustrix.com

Page 21: Moving an  E-commerce Site to AWS. A Case Study

21

Q&A

Page 22: Moving an  E-commerce Site to AWS. A Case Study

Thank You

facebook.com/clustrix

www.clustrix.com

@clustrix

linkedin.com/clustrix

ClustrixDB Overview22