© 2016 CLUSTRIX The First Scale-out SQL Database Engineered for Today’s Cloud Moving the Choxi E-commerce Site to AWS.
© 2016 CLUSTRIX
The First Scale-out SQL Database Engineered for Today’s Cloud
Moving the Choxi E-commerce Site to AWS.
Agenda
• Introductions• Choxi and their business goals• Clustrix and the process of moving to AWS• Q&A
2
Speakers
Keith BusseyVP of Technology, Choxi
3
Nick LambDirector of Consulting Services
4
Choxi and their business goals
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
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.
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
Typical IT Infrastructure
8
Vendor Portal
Replication
Disaster Recovery and Read Only cluster
Analytics and Information
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
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
11
Clustrix and the process of moving to AWS
Overview
• Allocating resources for ClustrixDB in AWS• Moving from the Datacenter to AWS• Flex Up / Flex Down for Seasonal Scale
12
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
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
Testing / Verification
• Initial Smoke Test• Query & Compatibility Testing• Load Testing• Failure Testing
15
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
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
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
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
20
Clustrix Resources for AWSPlease visit docs.clustrix.com
21
Q&A
Thank You
facebook.com/clustrix
www.clustrix.com
@clustrix
linkedin.com/clustrix
ClustrixDB Overview22