Friday, November 1, 2013

What does it take to stand up a public cloud service?

I have recently turned my attention to applying what I've learned by observing our work on existing SaaS and public cloud services, my studies of books like Release It, technical blogs like highscalability.com and the collaborative work I've done with Netflix.  I am now helping IBM teams stand up public cloud services on top of the IBM SoftLayer cloud.  In doing so, I have used the following checklist of key "abilities" of any well designed and operated cloud service in discussions with many teams.  I would love feedback on if the list is missing anything based on your experience.  I have tried to keep the list manageable ("short"), so there are likely things missing, but I think these items go a long way to creating a mission statement for teams who want a truly cloud native public service.

High Availability is Critical (Rule of Three, Fail in Silos)

  • Rule of "there must be at least three of everything" (likely more than three through clustering and partitioning)
  • One is a single point of failure, two is likely active/standby and likely will mean 0% availability for 100% of your users during recovery, three is where you start to be able to guarantee that you will have greater than 0% availability during failures (some users might see failure, but not all should see failure, and eventually none should) 
  • Do not let part of your application failing bring down the entire application
  • Apply circuit breaker and bulkhead approaches to contain failures and ensure your critical paths are isolated from dependencies and each other.
  • These rules apply not only for your core service servers, but all of the underlying cloud configuration and operational servers around your servers.  You are only as strong as your weakest link.
Automatic Recovery is a Must

  • If a failure occurs once, study it and learn what it takes to automate the recovery.
  • No failure (other than the first time) should result in a pager call to an operator.  Automate the recovery of the failing component through API's to your infrastructure, servers and procedures.
  • Test that this is true before the system tests it for you.  Run chaos monkey like procedures simulating failures you've seen in the past and ensure your automation recovers from failure. 
Practice Devops
  • Ensure that you can do live traffic shifting/shaping that allows for key devops practices such as live debugging, canary testing, red/black deployments (lights on code changes across clusters) and fast rollback in times of trouble.
  • Ensure all code is A/B tested with key "performance" indicators (KPI's) that relate back to your key business objectives.  A business owner should be able to view the "goodness" of your code through these KPI's.
  • The system must be observable to the developers as well.  You must design in monitoring so the developers can understand how the code is behaving in production.  As you merge your operational and application specific monitoring leverage "ops" experts.  They have already learned what to watch for - the hard way.
Prepare for Elastic Scale
  • Elastic scale is really an extension of a good HA architecture as much of the application architecture enables both.
  • Design your system to support arbitrary scale at every tier of its architecture.  Consider the front end edge tier carefully as it will be the single entry point for all users and can be a great place to offload all other tiers.
  • For most people manual scaling will proceed "follow the workload" automatic scaling.  Take steps to learn the system in manual scaling and transition to automatic scaling when ready.
  • Similarly, HA levels of scale will precede web levels of scale.  You might start small, but if you have architected correctly scaling up should be less painful.  If you hit walls in scalability, step back and look for the non-clusterable part of your architecture and fix it.
There are many technologies that can help you achieve the above abilities.  While I didn't want to focus on technology in this article, we have found some of the NetflixOSS based approaches to be very helpful starting points in achieving these abilities.  Over time we expect our enablement team we've been building at IBM to continue to document the technologies we are using.  Our goal is to be as open as possible about how we achieve our goals for our public cloud services so we can not only teach but learn from others doing similar things.  Stay tuned for more information.

5 comments:

  1. Andrew, there is a nice summary here that you'd probalby find an interesting read: http://www.quora.com/Major-Internet-Companies/How-do-big-companies-like-Facebook-Google-manage-software-releases-without-causing-system-outages-and-poor-user-experience As the article points out, many of these decisions need to be in the system design phase not bolt-on's afterwards.

    ReplyDelete
  2. Chris, Absolutely agree. The application and its underlying infrastructure itself needs to enabled to be ready for devops just as much as the servers around the application that manage it. The same applies for high availability and elastic scale. You can't just fork lift existing servers and applications and add wrappers to get these "abilities".

    ReplyDelete
  3. Hi Andrew,

    Congratulations on winning the Netflix contest.

    Recently got to your blog and it has a wealth of information. Thanks for sharing your knowledge.

    I live in the RTP area and was wondering if you know of Netflix OSS meetings in this area?

    Regards
    Manoj

    ReplyDelete
  4. Manoj,

    Thanks. There are no NetflixOSS specific meetups in the RTP area. I presented the NetflixOSS platform to the TriangleDevOps meetup (http://www.slideshare.net/aspyker/netflix-oss-fortriangledevopsfinal-27303112) last month as that is the meetup in the area that most closely aligns with the topic. I'd love to meetup and talk. There is another TriangleDevops meeting this week and I'll be there if you'd like to catch up.

    ReplyDelete
  5. If you need your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (even if they're dating somebody else now) you need to watch this video
    right away...

    (VIDEO) Have your ex CRAWLING back to you...?

    ReplyDelete