Looking to the cloud to serve Bitbucket (formerly Stash) to a horde of hungry developers? Netflix has the recipe for you! Take one part fresh open source platforms, two parts juicy deployment pipelines, and add a dash of gooey-rich custom bakes. Join this session to find out how Netflix used this unique combination of technologies to move Stash from their data center to the cloud and what they burned (yes, burned) along the way.
8. Pre-Cloud
Traditional DC
N-Tier Web Applications
Relational Databases
Cloud
Cloud infrastructure - AWS
Java, Linux, Apache
No SQLHigh Availability
Scale
Performance
Bitbucket At Netflix
9. Bitbucket At Netflix
Total LOC
1,610,528,526
Total Commits
5,554,379
Builds / Day
7,132
Jenkins Slaves
335
Developers
950
23. CPU, memory, sessions, JDBC
Completely stand-alone WAR
Built-in charting
Easy, drop in metrics
Easy, drop in metrics
Completely stand-alone WAR
System (CPU, etc), http sessions
Built-in charting
37. Lessons Learned
Janitor cleans unused
AWS infrastructure
new rule to clean old
RDS snapshots
RDS Manual Snapshot Limit
backup script more resilient to errors
Janitor Monkey
38. Volume mount dupe disaster
snapshot, attach to new instance
two Stashs connected to same database
prod
test Stash migrated Stash prod database
tables mismatched with code
prod immediately failed hard
Lessons Learned
3.5
context: populate test with prod data
test
3.8
connected to prod database
started test instance (prod configs!)
39. 3.5ish Volume mount dupe disaster
prod
Lessons Learned
3.5
test
3.8
shutdown test
ad-hoc SQL to stabilize database
did not restore database from backups
analyze liquibase code -> roll-back script
upgrade: roll-back then roll-forward
40. Bitbucket in AWS - Takeaways
Embrace cloud infrastructure
Include monitoring and metrics
Learn from our mistakes
External resources
netflix.github.io