Inside the Atlassian OnDemand Private Cloud
Upcoming SlideShare
Loading in...5
×
 

Inside the Atlassian OnDemand Private Cloud

on

  • 2,595 views

In order to launch Atlassian OnDemand, we needed to rethink the way we did infrastructure. Join Atlassian SaaS Platform Architect, George Barnett as he discusses how we delivered a scalable platform ...

In order to launch Atlassian OnDemand, we needed to rethink the way we did infrastructure. Join Atlassian SaaS Platform Architect, George Barnett as he discusses how we delivered a scalable platform that runs tens of thousands of JVMs, all while reducing the cost by ten-fold. This talk will cover design decisions, technology choices and the lessons learned during the build out.

Statistics

Views

Total Views
2,595
Slideshare-icon Views on SlideShare
2,533
Embed Views
62

Actions

Likes
3
Downloads
15
Comments
0

6 Embeds 62

https://summit.atlassian.com 49
http://qa-wac.atlassian.com 5
http://magnolia-staging.private.atlassian.com 4
https://twitter.com 2
https://wacdev.internal.atlassian.com 1
http://summit.atlassian.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Inside the Atlassian OnDemand Private Cloud Inside the Atlassian OnDemand Private Cloud Presentation Transcript

    • Tuesday, July 10, 12
    • Inside the Atlassian OnDemand private cloud George Barnett SAAS Platform ArchitectTuesday, July 10, 12
    • In 2010 a team of engineers moved into our secret lair (above a pub) to re-imagine our hosted platform.Tuesday, July 10, 12
    • 6 months later 13,500 VMs Launch - October 2011 1000 VMsTuesday, July 10, 12
    • We have a cloud. So what?Tuesday, July 10, 12
    • We also had a cloud.. and .. VM sprawl Poor performance Over provisioning Slow deployments Low visibility into the full stackTuesday, July 10, 12
    • Virtualisation often creates new challenges but does nothing about existing ones.Tuesday, July 10, 12
    • Tuesday, July 10, 12
    • Tuesday, July 10, 12
    • Tuesday, July 10, 12
    • Tuesday, July 10, 12
    • FocusTuesday, July 10, 12
    • Be less flexible about what infrastructure you provide.Tuesday, July 10, 12
    • “You can use any database you like, as long as its PostgreSQL 8.4.” #summit12Tuesday, July 10, 12
    • • Stop trying to be everything to everyone • (we have other clouds within Atlassian) • Lower operational complexity • Easier to provide a deeply integrated, well supported toolchain • Small test surface matrixTuesday, July 10, 12
    • Fail fast. Learn quickly.Tuesday, July 10, 12
    • Do as little as possible deploy and use itTuesday, July 10, 12
    • Block-1 A small scale model of the initial proposed platform architecture. 4 desktop machines and a switch. Purpose: Validate design, evaluate failure modes. http://history.nasa.gov/Apollo204/blocks.htmlTuesday, July 10, 12
    • Block-1 Applications do not fall over. Network boot assumptions validated. Creation of VM’s over NFS too resource and time intensive. (more on this later)Tuesday, July 10, 12
    • Block-2 A large scale model of the platform architecture. Purpose: Validate hardware resource assumptions and compare CPU vendors. http://history.nasa.gov/Apollo204/blocks.htmlTuesday, July 10, 12
    • Block-2 Customers per GB of RAM metric validated VM Distribution and failover tools work. Initial specs of compute hardware too conservative. Decided to add 50% more RAM.Tuesday, July 10, 12
    • HardwareTuesday, July 10, 12
    • Challenge Existing platform hardware was a poor fit for our workload. Memory and IO were heavily constrained, but CPU was not.Tuesday, July 10, 12
    • Monitoring We took 6 months worth of monitoring data from our existing platform. We used this to data to determine the right mix of hardware.Tuesday, July 10, 12
    • • 10 x Compute nodes (144G RAM, 12 cores, NO disks) • 3 x Storage nodes (24 disks) • Each rack delivered fully assembled • Unwrap, provide power, networking • Connected to customers in ~2 hoursTuesday, July 10, 12
    • Advantage #1 Reliable. Each machine goes through a 2 day burn in before it goes into the rack.Tuesday, July 10, 12
    • Advantage #2 Neat.Tuesday, July 10, 12
    • Advantage #3 Consistent.Tuesday, July 10, 12
    • Advantage #4 Easy to deploy.Tuesday, July 10, 12
    • No disks.Tuesday, July 10, 12
    • Wait. What?Tuesday, July 10, 12
    • Challenge Existing compute infrastructure used local disk for swap and hypervisor boot. Once we got the memory density right, it’s only boot.Tuesday, July 10, 12
    • • No disks in compute infrastructure • Avoid spinning 20 more disks per rack for a hypervisor OS • Evaluated booting from: • USB drives • NFS • Custom binary initrd image + kernelTuesday, July 10, 12
    • • No disks in compute infrastructure • Avoid spinning 20 more disks per rack for a hypervisor OS • Evaluated booting from: • USB drives (unreliable and slow!) • NFS (what if the network goes away?) • Custom binary initrd image + kernelTuesday, July 10, 12
    • • Image is ~170Mb gzipped filesystem • Download on boot, extract into ram - ~400Mb • No external dependencies after boot • All compute nodes boot from the same image • Reboot to known stateTuesday, July 10, 12
    • Compute Node Netboot Server dhcp PXE DHCP response TFTP gpxe dhcp DHCP Etherboot response HTTP bootscript kernel & boot image BootTuesday, July 10, 12
    • Sharp Edges. • No swap == provision carefully • Not a problem if you automate provisioning • Treat running hypervisor image like an appliance • Don’t change code - rebuild image and reboot • Doing this often? Too many services in the hypervisorTuesday, July 10, 12
    • SoftwareTuesday, July 10, 12
    • Challenge Virtualisation is often inefficient. There’s a memory and CPU penalty which is hard to avoid.Tuesday, July 10, 12
    • Open VZ • Linux containers • Basis for Parallels Virtuozzo Containers • LXC isn’t there yet • No guest OS kernels • No performance hit • Better resource sharingTuesday, July 10, 12
    • PerformanceTuesday, July 10, 12
    • http://wiki.openvz.org/Performance/vConsolidate-SMPTuesday, July 10, 12
    • http://wiki.openvz.org/Performance/LAMPTuesday, July 10, 12
    • Resource de-dupingTuesday, July 10, 12
    • “Don’t load the same thing twice”Tuesday, July 10, 12
    • Challenge Java VM’s aren’t lightweight.Tuesday, July 10, 12
    • • Full virtualisation does a poor job at this • 50 VMs = 50 Kernels + 50 caches + 50 shared libs! • Memory de-dupe combats this, but burns CPU. • Memory de-dupe works across all OSes • We don’t use Windows. • By being less flexible, we can exploit Linux specific features.Tuesday, July 10, 12
    • OpenVZ containers all share the same kernel.Tuesday, July 10, 12
    • • Provide a single OS image to all - free benefits: • Shared libraries only load once. • OS is cached only once. • OS image is the same on every instance.Tuesday, July 10, 12
    • Challenge If all containers share the same OS image, then managing state is a nightmare! One bad change in one container would break them all!Tuesday, July 10, 12
    • • But managing state on multiple machines is a solved problem! • What if you have >10,000 machines. • Why are you modifying the OS anyway?Tuesday, July 10, 12
    • Does your iPhone upgrade iOS when you install an app?Tuesday, July 10, 12
    • “Fix problems by removing them, not by adding systems to manage them.” #summit12Tuesday, July 10, 12
    • Read-only OS imagesTuesday, July 10, 12
    • Data classes in a system • OS and system daemon code • Application code • Application and user dataTuesday, July 10, 12
    • Tuesday, July 10, 12
    • Tuesday, July 10, 12
    • OpenVZ KernelTuesday, July 10, 12
    • OpenVZ KernelTuesday, July 10, 12
    • Container OpenVZ KernelTuesday, July 10, 12
    • Container OpenVZ KernelTuesday, July 10, 12
    • Container OS tools System supplied code OpenVZ KernelTuesday, July 10, 12
    • Container OS tools / - Read Only System supplied code OpenVZ KernelTuesday, July 10, 12
    • Container OS tools / - Read Only System supplied code OpenVZ KernelTuesday, July 10, 12
    • Container OS tools Applications, JVM’s / - Read Only System supplied code Configs OpenVZ KernelTuesday, July 10, 12
    • Container OS tools Applications, JVM’s / - Read Only /sw - Read Only System supplied code Configs OpenVZ KernelTuesday, July 10, 12
    • Container OS tools Applications, JVM’s / - Read Only /sw - Read Only System supplied code Configs OpenVZ KernelTuesday, July 10, 12
    • Container Application and user data - /data (R/W) OS tools Applications, JVM’s / - Read Only /sw - Read Only System supplied code Configs OpenVZ KernelTuesday, July 10, 12
    • Container Application and user data - /data (R/W) /data/service/ OS tools Applications, JVM’s / - Read Only /sw - Read Only System supplied code Configs OpenVZ KernelTuesday, July 10, 12
    • Container Application and user data - /data (R/W) /data/service/ OS tools Applications, JVM’s / - Read Only /sw - Read Only System supplied code Configs OpenVZ KernelTuesday, July 10, 12
    • Container Application and user data - /data (R/W) /data/service/ OS tools Applications, JVM’s / - Read Only /sw - Read Only System supplied code Configs OpenVZ KernelTuesday, July 10, 12
    • How? • Storage nodes export /e/ro/ & /e/rw • Build an OS distro inside a chroot. • Use whatever tools you are comfortable with. • Put this chroot tree in the RO location on storage nodes • Make a “data” dir in the RW location for each containerTuesday, July 10, 12
    • How? • On Container start bind mount: /net/storage-n/e/ro/os/linux-image-v1/ -> /vz/<ctid>/root • Replace etc, var & tmp with a memfs • Linux expects to be able to write to these • Mount containers data dir (RW) to /dataTuesday, July 10, 12
    • More benefits • Distribute OS images as a simple directory. • Prove that environments (Dev, Stg, Prd) are identical using MD5sum. • Flip between OS versions by changing a variableTuesday, July 10, 12
    • The Swear WallTuesday, July 10, 12
    • The swear wall helps prevent death by a thousand cuts. Your team has a gut feeling about whats hurting them - this helps you quantify that feeling and act on the pain.Tuesday, July 10, 12
    • Tuesday, July 10, 12
    • 1.!@&*^# Solaris! 2.Solaris gets a mark 3.Repeat 4.Periodically throw out offensive technology 5... 6.PROFIT!! (swear less)Tuesday, July 10, 12
    • Optimise for the task at hand. Don’t layer solutions onto problems. Get rid of them.Tuesday, July 10, 12
    • Thank you!Tuesday, July 10, 12