Download - C* Summit 2013: Aligning Technology Infrastructure With Horizontal Business Growth by Stefan Piesche
Transforming Constant Contact with DataStax Enterprise
#Cassandra13
Stefan Piesche, Chief Technology Officer
© Copyright 2013 Constant Contact Inc. 2
BIO § Stefan focuses on evaluating new
technologies to determine how they can help expand the Company's products and service architecture to accommodate future growth and increased performance.
§ To do this, he combines technology vision with practical delivery capabilities and engineering best practices.
§ In previous roles at Cobalt Group and Trilogy Enterprises, Stefan has developed and driven corporate technology strategy and provided technical direction, design and architecture for all product development.
#Cassandra13
Constant Contact
• 500,000+ Small Businesses • 70% ≤ 10 employees • 1:1 interactions x 10,000/day
© Copyright 2013 Constant Contact Inc. 3 #Cassandra13
Constant Contact - Engineering
• ~200 Developers, QA and Operations • ca. 2500 servers • 2.5 PB storage managed • Java • Ruby & Rails (96 node JRuby cluster) • DB2, MySQL, Cassandra
© Copyright 2013 Constant Contact Inc. 4 #Cassandra13
Goals for Constant Contact SAAS
Become a Multi Product Company
Growth via Horizontal Product Expansion: Go from 1 to Many
Expand the Organization (more Dev teams)
Grow via Mergers & Acquisitions
© Copyright 2013 Constant Contact Inc. 5 #Cassandra13
Tech in 2009
© Copyright 2013 Constant Contact Inc. 6
• Monolithic
• DB Centric
• Narrow Tech Stack: Websphere & DB2
#Cassandra13
Pros and Cons
+ Perfectly Suited for a Single Product, Vertically Growing Company
+ Easy to Understand for Dev Teams
- No Horizontal Scale
- Velocity
- Long Builds
- Many SPOFs
© Copyright 2013 Constant Contact Inc. 7 #Cassandra13
Technology Strategy Goals 2010 – 2015
Multi Datacenter (Active-DR to active-passive to active-active)
Horizontal Scale
Extensibility
Cost Effective & Predictable ($$ per 1000 customers)
Improve Dev Velocity
Fault Tolerant
© Copyright 2013 Constant Contact Inc. 8 #Cassandra13
Tech Strategy Approach
SOA Open source DB2
replacement: MySQL & ?
Integrate Rails Sharding? CI/CD
TDD Websphere -> JBoss
© Copyright 2013 Constant Contact Inc. 9 #Cassandra13
Sharding Pros and Cons
+ Semi-Predictable Scale
- Difficult to Introduce in a Monolithic Architecture (apps think data is in one place)
- Hard to Manage (Operations)
- Not always Cost Effective
© Copyright 2013 Constant Contact Inc. 10 #Cassandra13
Many of our Large Scale Data Needs are Non-Relational
Content
Tracking Events (opens, clicks, FB posts, tweets, event registrations)
© Copyright 2013 Constant Contact Inc. 11
Cassandra to the Rescue
#Cassandra13
Why Cassandra?
High Performance
‘Transparent’ Sharding
Horizontally Scalable
Fault Tolerant
Multi DC Support
Cost Effective
Replaced DB2 and SAN for >$1MM per DC with 72 node cluster supporting 2 DC for $250k
© Copyright 2013 Constant Contact Inc. 12 #Cassandra13
Cassandra Clusters at Constant Contact
Data
1BN Pieces of Content Managed
100BN Events Tracked
100-150BN Records Analyzed
© Copyright 2013 Constant Contact Inc. 13 #Cassandra13
Cassandra Clusters at Constant Contact
© Copyright 2013 Constant Contact Inc. 14
Data
1 - 72 Node Cluster with 36 TB
usable for Content
1 - 72 Node Cluster with 36 TB
usable for Tracking (will expand to 200
nodes over time)
1 - 24 Node Cluster with 60 TB
usable for Analytics (will
expand to 150 TB usable over time)
#Cassandra13
Clusters at CTCT
© Copyright 2013 Constant Contact Inc. 15
36 Nodes
Event tracking36 Nodes
Event tracking Analytics24 Nodes
36 Nodes
Content36 Nodes
Content
Santa Clara Boston
#Cassandra13
Results
Reduced Cost by 80%
+
Higher FT – No Outages
Yet J
5-10x Performance
Enables Use Cases We Couldn't Do Before. • Event tracking -
used to be 90 days
© Copyright 2013 Constant Contact Inc. 16 #Cassandra13
Learnings
Living on the Bleeding Edge can Pay Off (we started with version 0.7)
Start Small
Fortune Favors the Bold, but the Prepared: Partner with Vendors
Migration Process: Dual Writes, then Dual Reads, then Primary Reads from Cassandra,
Finally Deprecating the old RDBMS
© Copyright 2013 Constant Contact Inc. 17 #Cassandra13
© Copyright 2013 Constant Contact Inc. 18 #Cassandra13