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

High Availability - The easy way

Hugh Evans
September 04, 2013

High Availability - The easy way

Presented at Web Directions What Do You Know? Sep 4th 2013 Canberra, Australia

Hugh Evans

September 04, 2013
Tweet

More Decks by Hugh Evans

Other Decks in Programming

Transcript

  1. High Availability The easy way My talk tonight is on

    high availability and how it has become more feasible and accessible through cloud services.
  2. I’m going to briefly describe what high availability is and

    then look at how we implemented it for a client on a relatively small budget.
  3. What is high availability? High availability is a promise. A

    promise that you’ll have your services running for a stated percentage of time, known as…
  4. Why is it important? Availability is important for a variety

    of reasons. Financial rational is common, but it really depends on the service you’re running. You could imagine for a Tsunami alert system you’d want zero downtime.
  5. But if you’re like me and you simply hate it

    when your services go down, you do everything you can ahead of time - and within your budget - to make sure your services are as highly available as possible.
  6. Single points of failure The main strategy is to eliminate

    as many single points of failure as you can in your application stack. Sometimes there are external services you can do nothing about, so simply choose them wisely upfront. You take this elimination of SPOFs all the way down to the data centre and even its geographic location…
  7. Here we have a data centre in Hobbiton and another

    in Rivendale. Sensible choices really.
  8. Mordor however might not be such a great choice… Besides,

    most of our users are in Eriador anyhow and geographic proximity is important to reduce latency.
  9. You either build a failover stack in another data centre

    where a clone of your application stack sits relatively idle, although it’s constantly receiving data from the primary stack to stay in sync.
  10. You have two or more stacks, or nodes as they’re

    called in this model, running in two or more data centres, all serving live traffic. The nodes continuously syncronise data between themselves.
  11. Then come back up again. Resynconising their data from the

    other nodes. I prefer this model as you’re getting the most out of your resources. Plus you know that your other nodes are actually operational because they’re working all of the time, unlike the failover model.
  12. I figure the smaller I make their logo, the less

    of a shill I’ll sound… At the end of 2012 Amazon started offering their web services out of two data centres in Australia.
  13. Icelab has had the fortune to work with the Old

    Parliament House over the last few years and in that time we’ve developed some really high quality resources together.
  14. A lot of this content has made its way in

    to classroom programs around the country. So having the sites available when those classes are run is very important. Having a resource unavailable could be highly disruptive to an educator’s learning plan.
  15. Isn’t it great that HTML and CSS3 has come so

    far that screen shots simply don’t do it justice.
  16. Route 53 DNS Cloud Front CDN Elastic Load Balancer You

    start with AWS’s DNS service Route 53. We point that at their CDN and their load balancing services.
  17. Route 53 DNS Cloud Front CDN Elastic Load Balancer EC2

    A (server A) Availability Zone A Availability Zone B EC2 B (server B) Then we set up EC2 instances in both availability zones.
  18. Route 53 DNS Cloud Front CDN Elastic Load Balancer EC2

    A (server A) Availability Zone A Availability Zone B EC2 B (server B) Then you add a multi availability zone MySQL RDS service. You could do this yourself, but having the replication and failover handled for you is a big win.
  19. Route 53 DNS Cloud Front CDN Elastic Load Balancer EC2

    A (server A) Availability Zone A Availability Zone B EC2 B (server B) S3 Then finally you have your static files sent to S3 buckets and served from CloudFront. Theoretically the fours services outside the boxes are already in a high availability configuration.
  20. AWS OpsWorks AWS also now has OpsWorks and it gives

    you some solid point and click deployment options. It uses Chef under the hood.
  21. I actually tried it out and was able to configure

    the aforementioned setup in about 30 minutes and deploy our Rails apps to it. It has good support for NodeJS too.
  22. ~$240 USD a month Depends on how big your instances

    are and how much traffic you get.