SlideShare a Scribd company logo
1 of 14
Download to read offline
LISA 2011

Practice and Experience Report
Scaling on EC2 in a fast-paced environment
Nicolas Brousse
nicolas@tubemogul.com
December 8th 2011

2011 TubeMogul Incorporated All rights reserved.

1
Introduction - About the speaker
• My name is Nicolas Brousse
• I previously worked for many industry leading company in France
– From Web Hosting to Online Video services

(Lycos, MultiMania, Kewego, MediaPlazza...)

– Heavy traffic environment and large user databases
• I work as a Lead Operations Engineer at TubeMogul.com since 2008
• I help TubeMogul to scale its infrastructure
– From 20 servers to +500 servers
– Using 4 Amazon EC2 Regions + 1 Colo
– Monitoring with Nagios over 6,000 actives services and 1,000 passives services
– Collecting over 80,000 metrics with Ganglia
– Managing over 300 TB of data in Hadoop HDFS
– Billions HTTP queries a day
• Occasionally contribute to OpenSource projects
– Ganglia (PHP and PERL module)
– PHP Judy
2011 TubeMogul Incorporated All rights reserved.

2
Introduction - About TubeMogul
• Created in November 2006 by John Hughes and Brett Wilson
• Formerly a video distribution and analytics platform
• Acquire Illuminex - a flash analytics firm - in October 2008
• New platform call PlayTime™ :
– TubeMogul is a Video Marketing Company
– Built for Branding
– Integrate real-time media buying, ad serving, targeting, optimization and brand
measurement

TubeMogul simplifies the delivery of video ads and maximizes the impact of
every dollar spent by brand marketers
http://www.tubemogul.com/company/about_us

2011 TubeMogul Incorporated All rights reserved.

3
Amazon Clound Environment

2011 TubeMogul Incorporated All rights reserved.

4
Amazon Clound Environment
• We like it because....
– We can quickly start new servers/clusters
– We can quickly start new servers/clusters in many regions
• US East (Virginia)
• US West (North California)
• Europe (Dublin)
• Asia Pacific (Tokyo & Singapore)
– We can use different type of instances (RAM, CPU, Disks, etc.)
– It’s easy to automate with EC2 API
– It’s easy to plug to a configuration management tool

• But...
– It can be hard to troubleshoot some failures or network problems
– Occasionally being notified of hardware failures after the facts
– No Multicast (Though, possible with Amazon VPC)
– Bandwidth cost between regions can get expensive

2011 TubeMogul Incorporated All rights reserved.

5
Auto scale a cloud application
Crawling partners’ API to
aggregate Analytics data:
1. Call AWS API to start
instances
2. AWS Start instances
3. We push our code to the
instances
4. Open SSH tunnel to DB
5. Crawl Partners API and
aggregate the data
6. Push the data to our DB thru
SSH Tunnel
7. Shutdown EC2 instance

2011 TubeMogul Incorporated All rights reserved.

6
First approach to manage “always on” instances
•

Instances provisioning with a home made script called “Cerveza” in Tcl/Tk
–
–

•

Used to configure instance profile at boot
Let us run commands on multiple instances at once

Using LDAP and SQLite to track hostname and instance profiles
–
–

•

DNS Bind plugged to LDAP
SQLite store EBS volume, Instances id, keypair, AMI, etc.

Instance configuration with shell scripts from NFS mount
–

EBS Raid setup

–

Software deployment

–

Configuration changes

2011 TubeMogul Incorporated All rights reserved.

7
First approach to manage “always on” instances
•

Access Control
–
–

SSH Access limited by VPN

–

•

Security Group for each Cluster type (Hadoop, MySQL, etc.)
SSH and VPN plugged to LDAP

Easy way to identify instances
–
–

•

DNS plugged to LDAP
Each instance configured with human readable hostname
example: dev-mysql01, hadoop-namenode01, etc.

Easy working process for devs
–

•

Users’ home directory using NFS auto-mount

Automate Instances Monitoring
–

Trending with Ganglia, Alerting with Nagios

–

Using trending data for most Nagios checks

–

NSCA

2011 TubeMogul Incorporated All rights reserved.

8
Learning the hard way - the story
• SPOF in our infrastructure design lead us to a long outage
– prevent us to login into servers for couple of days
– couldn’t start new instances

1. Main server with NFS/LDAP went down
• corrupted EBS lead to fsck at boot time but no KVM on EC2...
• starting new instance still get stuck on fsck at boot
• end up using old AMI which we rebuild changing fstab
2. New instance took time to get ready to use because of old AMI
• need to recover from ldap backup first
• lost lot of configuration setup, slowing down our ability to manage instances
• need to re-install and configure our instance management tool “Cerveza”
3. /etc/resolv.conf need to be changed on every instances
• ssh backdoor didn’t work all the time because of LDAP/SSH/NFS timeout
4. Security Group rules with private IP made the recovery process more
complex
2011 TubeMogul Incorporated All rights reserved.

9
Learning the hard way - quick fixes

2011 TubeMogul Incorporated All rights reserved.

10
Going worldwide
• Need to handle multiple EC2 region for improved response time
– use of gateway server in each Availability Zone
– DNS Caching, LDAP Syncrepl, NFS with FS-Cache

• “Cerveza” rewrite in Python
– Replace SQLite by SimpleDB
– can be run from our laptop, need to run on a specific server
– handle full provisioning (start/stop/reboot) instances
– easily define instances profiles with YAML
– use EC2 tags to identify instances and EBS volumes

• Stop building our own AMI
– use of public ubuntu AMI server to reduce maintenance and support burden
– use of cloud-init to easy start and preconfigure new instances
– use of Puppet as our configuration management tool

2011 TubeMogul Incorporated All rights reserved.

11
Going worldwide

2011 TubeMogul Incorporated All rights reserved.

12
Lesson Learned
• Cloud environment doesn’t mean you should by-pass basic infrastructure
management rules
• Make sure the evolution of your infrastructure doesn’t introduce SPOF
• Keep it simple, stupid
• Don’t forget about backup and recovery process
• Use a configuration management tool early to prevent headache later

2011 TubeMogul Incorporated All rights reserved.

13
Thank You...
TubeMogul is Hiring !
http://www.tubemogul.com/company/careers
jobs@tubemogul.com
Follow us on Twitter
@tubemogul
2011 TubeMogul Incorporated All rights reserved.

@orieg

14

More Related Content

More from Nicolas Brousse

SuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuite
SuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuiteSuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuite
SuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuiteNicolas Brousse
 
SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...
SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...
SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...Nicolas Brousse
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthNicolas Brousse
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Nicolas Brousse
 
Improving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetImproving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetNicolas Brousse
 
Scaling Bleeding Edge Technology in a Fast-paced Environment
Scaling Bleeding Edge Technology in a Fast-paced EnvironmentScaling Bleeding Edge Technology in a Fast-paced Environment
Scaling Bleeding Edge Technology in a Fast-paced EnvironmentNicolas Brousse
 
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Nicolas Brousse
 
Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...
Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...
Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...Nicolas Brousse
 
Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...
Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...
Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...Nicolas Brousse
 

More from Nicolas Brousse (9)

SuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuite
SuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuiteSuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuite
SuiteWorld16: Mega Volume - How TubeMogul Leverages NetSuite
 
SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...
SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...
SRECon16: Moving Large Workloads from a Public Cloud to an OpenStack Private ...
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
 
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
Puppet Camp Silicon Valley 2015: How TubeMogul reached 10,000 Puppet Deployme...
 
Improving Operations Efficiency with Puppet
Improving Operations Efficiency with PuppetImproving Operations Efficiency with Puppet
Improving Operations Efficiency with Puppet
 
Scaling Bleeding Edge Technology in a Fast-paced Environment
Scaling Bleeding Edge Technology in a Fast-paced EnvironmentScaling Bleeding Edge Technology in a Fast-paced Environment
Scaling Bleeding Edge Technology in a Fast-paced Environment
 
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
Scaling on EC2 in a fast-paced environment (LISA'11 - Full Paper)
 
Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...
Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...
Bringing Business Awareness to Your Operation Team (Nagios World Conference 2...
 
Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...
Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...
Optimizing your Monitoring and Trending tools for the Cloud (Nagios World Con...
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Scaling on EC2 in a Fast-Paced Environment (LISA'11)

  • 1. LISA 2011 Practice and Experience Report Scaling on EC2 in a fast-paced environment Nicolas Brousse nicolas@tubemogul.com December 8th 2011 2011 TubeMogul Incorporated All rights reserved. 1
  • 2. Introduction - About the speaker • My name is Nicolas Brousse • I previously worked for many industry leading company in France – From Web Hosting to Online Video services (Lycos, MultiMania, Kewego, MediaPlazza...) – Heavy traffic environment and large user databases • I work as a Lead Operations Engineer at TubeMogul.com since 2008 • I help TubeMogul to scale its infrastructure – From 20 servers to +500 servers – Using 4 Amazon EC2 Regions + 1 Colo – Monitoring with Nagios over 6,000 actives services and 1,000 passives services – Collecting over 80,000 metrics with Ganglia – Managing over 300 TB of data in Hadoop HDFS – Billions HTTP queries a day • Occasionally contribute to OpenSource projects – Ganglia (PHP and PERL module) – PHP Judy 2011 TubeMogul Incorporated All rights reserved. 2
  • 3. Introduction - About TubeMogul • Created in November 2006 by John Hughes and Brett Wilson • Formerly a video distribution and analytics platform • Acquire Illuminex - a flash analytics firm - in October 2008 • New platform call PlayTime™ : – TubeMogul is a Video Marketing Company – Built for Branding – Integrate real-time media buying, ad serving, targeting, optimization and brand measurement TubeMogul simplifies the delivery of video ads and maximizes the impact of every dollar spent by brand marketers http://www.tubemogul.com/company/about_us 2011 TubeMogul Incorporated All rights reserved. 3
  • 4. Amazon Clound Environment 2011 TubeMogul Incorporated All rights reserved. 4
  • 5. Amazon Clound Environment • We like it because.... – We can quickly start new servers/clusters – We can quickly start new servers/clusters in many regions • US East (Virginia) • US West (North California) • Europe (Dublin) • Asia Pacific (Tokyo & Singapore) – We can use different type of instances (RAM, CPU, Disks, etc.) – It’s easy to automate with EC2 API – It’s easy to plug to a configuration management tool • But... – It can be hard to troubleshoot some failures or network problems – Occasionally being notified of hardware failures after the facts – No Multicast (Though, possible with Amazon VPC) – Bandwidth cost between regions can get expensive 2011 TubeMogul Incorporated All rights reserved. 5
  • 6. Auto scale a cloud application Crawling partners’ API to aggregate Analytics data: 1. Call AWS API to start instances 2. AWS Start instances 3. We push our code to the instances 4. Open SSH tunnel to DB 5. Crawl Partners API and aggregate the data 6. Push the data to our DB thru SSH Tunnel 7. Shutdown EC2 instance 2011 TubeMogul Incorporated All rights reserved. 6
  • 7. First approach to manage “always on” instances • Instances provisioning with a home made script called “Cerveza” in Tcl/Tk – – • Used to configure instance profile at boot Let us run commands on multiple instances at once Using LDAP and SQLite to track hostname and instance profiles – – • DNS Bind plugged to LDAP SQLite store EBS volume, Instances id, keypair, AMI, etc. Instance configuration with shell scripts from NFS mount – EBS Raid setup – Software deployment – Configuration changes 2011 TubeMogul Incorporated All rights reserved. 7
  • 8. First approach to manage “always on” instances • Access Control – – SSH Access limited by VPN – • Security Group for each Cluster type (Hadoop, MySQL, etc.) SSH and VPN plugged to LDAP Easy way to identify instances – – • DNS plugged to LDAP Each instance configured with human readable hostname example: dev-mysql01, hadoop-namenode01, etc. Easy working process for devs – • Users’ home directory using NFS auto-mount Automate Instances Monitoring – Trending with Ganglia, Alerting with Nagios – Using trending data for most Nagios checks – NSCA 2011 TubeMogul Incorporated All rights reserved. 8
  • 9. Learning the hard way - the story • SPOF in our infrastructure design lead us to a long outage – prevent us to login into servers for couple of days – couldn’t start new instances 1. Main server with NFS/LDAP went down • corrupted EBS lead to fsck at boot time but no KVM on EC2... • starting new instance still get stuck on fsck at boot • end up using old AMI which we rebuild changing fstab 2. New instance took time to get ready to use because of old AMI • need to recover from ldap backup first • lost lot of configuration setup, slowing down our ability to manage instances • need to re-install and configure our instance management tool “Cerveza” 3. /etc/resolv.conf need to be changed on every instances • ssh backdoor didn’t work all the time because of LDAP/SSH/NFS timeout 4. Security Group rules with private IP made the recovery process more complex 2011 TubeMogul Incorporated All rights reserved. 9
  • 10. Learning the hard way - quick fixes 2011 TubeMogul Incorporated All rights reserved. 10
  • 11. Going worldwide • Need to handle multiple EC2 region for improved response time – use of gateway server in each Availability Zone – DNS Caching, LDAP Syncrepl, NFS with FS-Cache • “Cerveza” rewrite in Python – Replace SQLite by SimpleDB – can be run from our laptop, need to run on a specific server – handle full provisioning (start/stop/reboot) instances – easily define instances profiles with YAML – use EC2 tags to identify instances and EBS volumes • Stop building our own AMI – use of public ubuntu AMI server to reduce maintenance and support burden – use of cloud-init to easy start and preconfigure new instances – use of Puppet as our configuration management tool 2011 TubeMogul Incorporated All rights reserved. 11
  • 12. Going worldwide 2011 TubeMogul Incorporated All rights reserved. 12
  • 13. Lesson Learned • Cloud environment doesn’t mean you should by-pass basic infrastructure management rules • Make sure the evolution of your infrastructure doesn’t introduce SPOF • Keep it simple, stupid • Don’t forget about backup and recovery process • Use a configuration management tool early to prevent headache later 2011 TubeMogul Incorporated All rights reserved. 13
  • 14. Thank You... TubeMogul is Hiring ! http://www.tubemogul.com/company/careers jobs@tubemogul.com Follow us on Twitter @tubemogul 2011 TubeMogul Incorporated All rights reserved. @orieg 14