Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Deploying large scale web applications

Joël Cox
November 24, 2011

Deploying large scale web applications

Presentation for undergraduate Information Science students enrolled in a Storage and Retrieval course.

More from me about business and technology.

Joël Cox

November 24, 2011
Tweet

More Decks by Joël Cox

Other Decks in Technology

Transcript

  1. • Dependencies across multiple apps • No clear package manager

    aka • This was early 2000s THE PROBLEM $ sudo get-apt install apache2
  2. THE SOLUTION • Write your own! • Why no open

    source solution? • Not available at the time • Not written in Perl/PHP • Support for Linux and FreeBSD
  3. DIST • Central software repository • Mirrored across data centers

    • Mostly open source projects with special sauce
  4. YINST • Install packages • Create packages, which can be

    send to dist • Easy configuration $ yinst set yapache.port=80
  5. POGO • So how do we run this on thousands

    of machines (and keep things live)? • Mass SSH tool • Constraint limited execution
  6. TIE IT TOGETHER • Everything under version control, thus transactional

    • Managing thousands of deploys a day $ pogo run "yinst restore -igor -igor_tag 2011-11-14a" -I @east.frontend
  7. PREVIOUS SITUATION • One (git) deployment server • Every nth

    servers requires one additional deployment server for a given t
  8. THE NUMBERS • Between 500MB and 1GB packages • “Thousands”

    of servers • About 1TB per deploy (guesstimate) • From 15 minutes to 12 seconds* * early 2010
  9. MURDER • BitTorrent protocol • Open source packages as basis

    • Decentralized apart from the tracker • Capped gigabit connections
  10. OPTIMIZATIONS • One parent, one child • Timeouts • No

    encryption • Transfer in-memory (!) • No DHT
  11. TIE IT TOGETHER • Capistrano as SSH interface • Tracker

    and seeder in each data centre $ cap murder:start_tracker $ cap murder:create_torrent tag="Deploy1" files_path="~/files" $ cap murder:start_seeding tag="Deploy1" $ cap murder:peer tag="Deploy1" destination_path="/tmp"
  12. FUTURE (OUR!) CHALLENGES • Scale even bigger (storage, database) •

    Continuous integration & deployment • Automated testing • All code is deployed to production
  13. THANKS TO • Raymund Ramos (@ram7os) Service Engineer at Yahoo!

    • Larry Gadea (@lg) Infrastructure Engineer at Twitter