The Availability Equation

Are you familiar with the Availability Equation? In a nutshell, this equation shows how the total time needed to restore an application to usability is equal to the time required to detect that an application is experiencing a problem plus the time required to perform a recovery action:

TRESTORE = TDETECT + TRECOVER

The equation introduces the key concepts of high availability (HA): clustering, problem detection, and subsequent recovery. HA solutions monitor the health of business application components; when problems are detected, these solutions act to restore them to service. The objective of deploying an HA solution is to minimize downtime.

Reducing detection and recovery times are two important tasks of any HA solution that you choose to deploy. Today’s applications are combinations of technologies: servers, storage, network infrastructure, and so on. When reviewing your HA options, be certain that you understand the technologies that each solution uses to detect and recover from all outage types. Each technology has a direct impact on service restoration times.

One technology that is crucial to providing the fastest possible restoration time is known as local detection and recovery (aka service-level problem detection and recovery). In a basic clustering solution, servers are connected and configured such that one or more servers can take over the operations of another in the event of a server failure. The server nodes in the cluster continuously send small data packets, often called heartbeat signals, to each other to indicate that they are “alive”.

In simple clustered environments, when one server stops generating heartbeats, other cluster members assume that this server is down and begin the process of taking over responsibility for that server’s domain of operation. This approach is adequate for detecting failure at the server level. But unless problems cause the interruption or cessation of heartbeat signals, server-level detection is inadequate. More than that, it can actually magnify the extent and impact of an outage.

For example, if Apache processes hang, the server may still send heartbeats — even though the Web server subsystem has ceased to perform its primary function. Rather than restart the Apache subsystem on the same or a different server, a basic server-level clustering solution would restart the entire software stack of the failed server on a backup server, thereby causing interruption to users and extending recovery time.

Using local detection and recovery, advanced clustering solutions deploy health-monitoring agents within individual cluster servers, to monitor individual system components such as a file system, a database, user-level application, IP address, and so on. These agents use heuristics that are specific to the monitored component. Therefore, the agents can predict and detect operational issues and then take the most appropriate recovery action. Often, the most efficient recovery method is to stop and restart the problem subsystem on the same server.

By detecting failures at a more granular level than simply by observing server-level heartbeats, and by enabling recovery within the same physical server, the time to restore an application to user availability can be greatly reduced.

Make certain that whichever HA solution you deploy can also support local detection and recovery.

OK, folks that’s it for this post. Have a nice day guys…… Stay tuned…..!!!!!

Don’t forget to like & share this post on social networks!!! I will keep on updating this blog. Please do follow!!!

AWS EC2 Instance Purchasing Options – All You Need to Know

In this post I will let you know various EC2 instance purchasing options AWS provides you so that you can serve your workload in the most cost effective manner.

AWS EC2 Instance Purchasing Options

  1. On-Demand Instances
  2. Reserved Instances 
  3. Savings Plans 
  4. Spot Instances 
  5. Dedicated Hosts 
  6. Dedicated Instances
  7. Capacity Reservations

1. On-Demand Instance

This is one of the most flexible option to launch an EC2 instance in AWS. You pay per second of compute capacity that you launch.

  • No commitment is needed from your side and you may decide to terminate your instance after 5 minutes and it’s absolutely fine.
  • You are in complete control of lifecycle for example when to launch , stop, hibernate, reboot or terminate it. You pay only for seconds when your instance is in running state. You can find price per second here.
  • AWS doesn’t guarantee that your instance will be launched. Although AWS always tries to launch your instance and to be honest I have never faced that I requested an on-demand instance and it’s not launched But there still can be peak load on AWS side when your instance is not launched on request
  • It is well suited for short term or irregular workload which can not be interrupted.
  • You can use it for application development/testing

2. Reserved Instances

Reserved Instances provides huge savings on your EC2 instances compared to on-demand up to 72%. All you need is to commit to a specific instance configuration, instance type and duration which can be either 1 or 3 years.

  • Well suited for consistent workload for example a database
  • In other words, you can use this option to reserve the compute capacity with a commitment of duration and config
  • Reservation period can be either 1 year or 3 year. Please not that it’s not 1-3 years , it’s either 1 or 3. No other option
  • You can use convertible reserved instances if you ever want to change instance type but discount will be less in that case
  • There is a limit on number of reserved running instances of 20 per Region. However, you can request a limit increase anytime if you need.

Important Note: Previously there uses to be a Scheduled Reserved Instances option in reserved instances. which lets you reserve capacity that is scheduled to recur daily, weekly, or monthly, with a specified start time and duration, for a one-year term. But as of now AWS is not offering this. You can check more details here

3. Savings Plans

This is a newer plan by AWS and it helps you reduce your EC2 cost if you make a commitment that you will use it for a specific duration that should either 1 or 3 years but the added advantage on top of reserved instance is that you are allowed to change instance configuration/types.

  • Savings plan provides significant cost saving as compared to on-demand at the same time is flexible enough to let you change configurations/instance types
  • There is no limit on running instances
  • After AWS came up with Savings Plan, I don’t think there are needs to go with Reserved Instance. Savings plan is far more flexible

4. Spot Instances

Spot instances are one of the most cost effective options to launch an EC2 instance on AWS but your instance can be taken from you at any time.

  • Ideally you request unused EC2 instances and that’s the reason they are most cost effective and provides cost saving of 90% as compared to on-demand
  • You bid the price and get the instance when the bid price is under that
  • Your instances will be reclaimed from you as soon as bid price goes beyond the threshold with 2 minutes of notification
  • Instance can be taken back from you at any time
  • Suitable for workload that can handle interruption well by providing compute at cheapest price
  • Not suitable for critical workload or workload that can’t handle interruption.

5. Dedicated Hosts

A dedicated host is a real physical server that you can book. Which means it’s full EC2 capacity is for your use. No body else can launch an EC2 instance on that server.

  • Dedicated host allows you to use your existing server license(Bring your own licensee- BYOL)
  • Lets you meet your regulatory/compliance requirement
  • You have complete visibility and control over how instances are placed on the server.

6. Dedicated Instances

Dedicated instances provides you with dedicated hardware for your EC2 instances.

  • May share hardware with instances that are in your account
  • No control on instance placement

7. Capacity Reservations

As I said in On-Demand section that AWS doesn’t gives 100% guarantee that your instance will be launched. What if you need some capacity reserved but don’t want to go on long term commitment of 1 or 3 year.

In this case you can reserve capacity and you can cancel it if you don’t need it. It doesn’t provide you any cost benefit but gives you surety that you will not run out of capacity.

  • Doesn’t require any commitment. You can create capacity reservation when you need it and cancel it when you don’t need it. Its that simple.
  • Capacity reservation happens in a specific availability zone
  • Doesn’t provide any billing discount

Conclusion

In this quick article, I shared with you the EC2 instance purchasing options provided by AWS so that you can balance your cost with your requirement.

We learnt that On-Demand is the most flexible at the same time costilest option to launch your instance while Spot instances are cheapest but they can be taken back from you at any time.

Savings Plan is a good option when you are buying an instance for a long term like 1 or 3 years. As it allows you to change certain configurations at later times, it doesn’t make sense to go with reserved instances any more.

Dedicated host you can think of when you have some compliance requirement or you want you reuse your existing server license.

OK, folks that’s it for this post. Have a nice day guys…… Stay tuned…..!!!!!

Don’t forget to like & share this post on social networks!!! I will keep on updating this blog. Please do follow!!!