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. Keith Bussey, VP of Technology at Choxi sought to move to AWS to achieve the promise of the cloud — the ability to instantly scale capacity and costs to meet seasonal business cycles.
Choxi’s move to AWS was planned and executed in swift and efficient fashion. The relocation of the Clustrix database into the cloud infrastructure (AWS) was completed without issue in time for the recent holiday season and to avoid causing any downtime in Choxi’s 24×7 service.
Join the webinar and learn first hand from Keith and Nick Lamb, Director of Consulting Services for Clustrix, how to benefit from tools like AWS and ClustrixDB to match the cycles and goals of your business.
5. 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
6. 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.
7. 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
9. 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
10. 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
12. Overview
• Allocating resources for ClustrixDB in AWS
• Moving from the Datacenter to AWS
• Flex Up / Flex Down for Seasonal Scale
12
13. 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
14. 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
16. 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 statusG` on ClustrixDB AWS
16
17. 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
18. 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
19. 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
Keith has led the development team at Choxi for the last five years and has built a system that is capable of engaging shoppers and scaling to meet the outrageous demands of holiday shopping seasons and flash sales.
Nick Lamb is the Director of Consulting Services at Clustrix and he has been working with Clustrix customers for more than eight years.
Keith--can you talk about how many app servers you use normall and during the holiday? Do you have multiple applications accessing the database?
Low point of day. 12 instances for web servers. Spikes daily to 20 web servers. During last holiday season we spiked to 240 web servers.
Configure Firewall Existing Database and AWS ClustrixDB instance can communicate
Enable binlogging (RBR) before starting backup.
Choxi: Backup was already enabled.
Choxi: Used Fast Backup / Restore
3 hours for each operation.
Loading test data and schema pointing existing test infrastructure at the AWS cluster is recommended.
For customers without this kind of infrastructure, simple verification for compatibility, load , etc as described here should be sufficient.
Choxi: provisioned X nodes and then determined that only Y nodes were needed. AWS made this not only possible, but easy. ##DETAIL HERE
Existing Database: Master
Clustrix AWS is slave
Choxi: replication took ~3 hours to catch up.
Enable binlogging on AWS cluster
Stop writes to bare metal
Set Baremetal to Read Only
Set AWS cluster to Read/Write
* 12:14am Choxi Apps off / Cutover Started
* 12:27am Go Ahead to re-enable Apps pointing at AWS Cluster
* 12:40am Confirmation that all application services back online and function as expected.
* 1:15am Backup of the AWS cluster started.
Because of the ease and lack of commitment required to allocate new hardware in AWS it is very easy to add additional nodes to your ClustrixDB cluster when additional capacity and processing power is needed to meet scaling demands (seasonal or otherwise).
URLs, screen shots, etc. lists of AMIs and articles
Setup:
http://docs.clustrix.com/display/CLXDOC/Best+Practices+For+AWS+Security+Groups
http://docs.clustrix.com/display/CLXDOC/Network+Security+with+ClustrixDB
http://docs.clustrix.com/display/CLXDOC/Load+Balancing+Clustrix+with+HAProxy
ClustrixDB AMI:
http://docs.clustrix.com/display/CLXDOC/Provisioning+ClustrixDB+using+the+Private+AMI
http://docs.clustrix.com/display/CLXDOC/Expanding+a+ClustrixDB+AMI+cluster
Migration:
http://docs.clustrix.com/display/CLXDOC/ClustrixDB+Fast+Backup+and+Restore
http://docs.clustrix.com/display/CLXDOC/Migrating+to+Clustrix+from+MySQL
http://docs.clustrix.com/display/CLXDOC/Loading+Data+Onto+Clustrix#LoadingDataOntoClustrix-mysqldumpandclustrix_import
URLs, screen shots, etc. lists of AMIs and articles
Setup:
http://docs.clustrix.com/display/CLXDOC/Best+Practices+For+AWS+Security+Groups
http://docs.clustrix.com/display/CLXDOC/Network+Security+with+ClustrixDB
http://docs.clustrix.com/display/CLXDOC/Load+Balancing+Clustrix+with+HAProxy
ClustrixDB AMI:
http://docs.clustrix.com/display/CLXDOC/Provisioning+ClustrixDB+using+the+Private+AMI
http://docs.clustrix.com/display/CLXDOC/Expanding+a+ClustrixDB+AMI+cluster
Migration:
http://docs.clustrix.com/display/CLXDOC/ClustrixDB+Fast+Backup+and+Restore
http://docs.clustrix.com/display/CLXDOC/Migrating+to+Clustrix+from+MySQL
http://docs.clustrix.com/display/CLXDOC/Loading+Data+Onto+Clustrix#LoadingDataOntoClustrix-mysqldumpandclustrix_import