Tuesday, March 8, 2016

AWS S3 Data Durability

Exam Scenario Question :-
A customer is leveraging Amazon Simple Storage Service in eu-west-1 to store static content for web-based property. The customer is storing objects using the Standard Storage class. Where are the customers’ objects replicated?
  1. Single facility in eu-west-1 and a single facility in eu-central-1
  2. Single facility in eu-west-1 and a single facility in us-east-1
  3. Multiple facilities in eu-west-1
  4. A single facility in eu-west-1

Answer :-
The question targets the S3 Data Durability which mentions the objects are stored redundantly across multiple facilities in the same Amazon S3 region.
Amazon S3 provides a highly durable storage infrastructure designed for mission-critical and primary data storage. Objects are redundantly stored on multiple devices across multiple facilities in an Amazon S3 region. To help better ensure data durability, Amazon S3 PUT and PUT Object copy operations synchronously store your data across multiple facilities before returning SUCCESS. Once the objects are stored, Amazon S3 maintains their durability by quickly detecting and repairing any lost redundancy.

AWS EBS vs Instance Store

EC2 instances can be launched using either Elastic Block Store (EBS) or Instance Store volume as root volumes and additional volumes.

Instance Store (Ephemeral storage)
An Instance store backed instance is an EC2 instance uses Instance store as root device and accesses storage from disks that are physically attached to the host computer. Instance store provides temporary block-level storage for instances. The data on an instance store volume persists only during the life of the associated instance; if you stop or terminate an instance, any data on instance store volumes is lost.

Key points for Instance store backed Instance
  1. Boot time is very fast usually less then a min, as the storage resides on the same machine
  2. Can be selected as Root Volume and attached as additional volumes
  3. Instance store backed Instances can be of maximum 10GiB volume size
  4. Instance store volume can be attached as additional volumes only when is the Instance is launched and cannot be attached once the Instance is up and running
  5. Instance store backed Instances cannot be stopped as one of the main reason being when stopped and started AWS does not guarantee the Instance would be launched in the same host.
  6. Data on Instance store volume is LOST in following scenarios :-
    • Failure of an underlying drive
    • Stopping an EBS-backed instance where instance store are additional volumes
    • Termination of the Instance
  7. Data on Instance store volume is NOT LOST when the instance is rebooted
  8. AMI creation requires usage on AMI tools and needs to be executed from within the server
  9. Instance store backed Instances cannot be upgraded

Amazon Elastic Block Store (EBS)
An "EBS-backed" instance is an EC2 instance which uses an EBS volume as it’s root device.
An EBS volume behaves like a raw, unformatted, external block device that you can attach to a single instance and are not physically attached to the Instance host computer (more like a network attached storage). The volume persists independently from the running life of an instance. After an EBS volume is attached to an instance, you can use it like any other physical hard drive. You can also detach an EBS volume from one instance and attach it to another instance. EBS volumes can also be created as encrypted volumes using the Amazon EBS encryption feature.

Key points for EBS backed Instance
  1. Boot time is slower then Instance store and usually less then 5 min
  2. Can be selected as Root Volume and attached as additional volumes
  3. EBS backed Instances can be of maximum 16TiB volume size depending upon the OS
  4. EBS volume can be attached as additional volumes when the Instance is launched and even when the Instance is up and running
  5. Data on the EBS volume is LOST only if the Root Volume is EBS backed and the Delete On Termination flag is checked (Checked by default)
  6. Data on EBS volume is NOT LOST in following scenarios :-
    • Reboot on the Instance
    • Stopping an EBS-backed instance
    • Termination of the Instance for the additional EBS volumes
  7. EBS volumes are tied to a single AZ  in which they are created
  8. EBS volumes are automatically replicated within that zone to prevent data loss due to failure of any single hardware component
  9. AMI creation is easy using a Single command
  10. EBS backed Instances can be upgraded for instance type, Kernel, RAM disk and user data
Exam Scenario Questions :-
  1. EC2 EBS-backed (EBS root) instance is stopped, what happens to the data on any ephemeral store volumes?
    • Data is automatically saved in an EBS volume.
    • Data is unavailable until the instance is restarted.
    • Data will be deleted and will no longer be accessible. 
    • Data is automatically saved as an EBS snapshot.
  2. When an EC2 instance that is backed by an S3-based AMI is terminated, what happens to the data on the root volume?
    • Data is automatically saved as an EBS snapshot.
    • Data is automatically saved as an EBS volume.
    • Data is unavailable until the instance is restarted. 
    • Data is automatically deleted.
  3.  Which of the following will occur when an EC2 instance in a VPC (Virtual Private Cloud) with an associated Elastic IP is stopped and started? (Choose 2 answers)
    • The Elastic IP will be dissociated from the instance
    • All data on instance-store devices will be lost
    • All data on EBS (Elastic Block Store) devices will be lost
    • The ENI (Elastic Network Interface) is detached
    • The underlying host for the instance is changed 

      Monday, March 7, 2016

      AWS Trusted Advisor Categories


      Exam Question :- 
      The Trusted Advisor service provides insight regarding which four categories of an AWS account?
      • Security, fault tolerance, high availability, and connectivity
      • Security, access control, high availability, and performance
      • Performance, cost optimization, security, and fault tolerance
      • Performance, cost optimization, access control, and connectivity

      Answer :-

      Trusted Advisor provides best practices for only the below categories 
      1. Cost Optimization
      2. Performance
      3. Security
      4. Fault Tolerance
       
       

      Sunday, March 6, 2016

      AWS - Root access enabled services

      Exam Question :- 
      Which services provide root level access in aws?


      Answer :-
      1. Only the below services provide Root level access
        • EC2
        • Elastic Beanstalk
        • Elastic MapReduce - Master Node
        • Opswork
      2. None of the AWS managed services like RDS, S3, Glacier, DynamoDB provide root or admin access to the underlying servers

      Saturday, March 5, 2016

      AWS - Autoscaling Troubleshooting

      Exam Question Scenario :- 
      EC2 instances fail to launch with Autoscaling configuration

      Description :-
      Autoscaling configuration requires the following :-

      Autoscaling launch configuration which allows you to select an 
        • AMI
        • Instance type
        • IAM role (optional)
        • Security group
        • Key pair file
      Autoscaling group configuration allows you to select AZ to be used to launch the EC2 instances with the selected launch configuration




       Troubleshooting key points :-
      1. AMI id does not exist or is still pending and cannot be used to launch instances
      2. Security group provided in the launch configuration does not exist
      3. Key pair associated with the EC2 instance does not exist
      4. Autoscaling group not found or is incorrectly configured
      5. AZ configured with the Autoscaling group is no longer supported cause it might not be available
      6. Invalid EBS block device mappings
      7. Instance type is not supported in the AZ
      8. Capacity limits reached either cause of the restriction on the number of instance type that can be launched in a region or cause AWS is not able to provision the specified instance type in the AZ (for e.g. no more spot instances or On-demand instances availability)
      More details @ AWS Autoscaling Developer Guide

      AWS - EC2 - Troubleshooting Connecting to an Instance

      Exam Question Scenario :- 
      If you try to connect to your instance and get an error message Network error: Connection timed
      out or Error connecting to [instance], reason: -> Connection timed out: connect.


      Troubleshooting key points :-
      1. Verify the Security groups are properly configured to allow ssh access from the ip to the EC2 instance. For Security groups, Inbound traffic from the public ip address should be enabled
      2. Verify the NACLs are properly configured to allow ssh access from the ip to the EC2 instance. For NACLs, Inbound traffic from the public ip address should be enabled as well as the Outbound traffic for the response should be enabled
      3. Verify you are using the private key file that corresponds to the key pair that you selected when you launched the instance
      4. Verify you are connecting with the appropriate user name for your AMI. Mind the user names used to connect to the EC2 instance are different depending upon the AMI (which also determines the OS for the Instance)
      5. Private User key file is not recognized by the Server
      More details in EC2 User Guide

      Sunday, July 1, 2012

      Solr facet distinct count


      With Solr, sometimes you want to know the distinct facet count for e.g. to be able to paginate over the facet results.

      The distinct count of the facets is available with Solr 4.0 (as of writing).

      The Solr patch SOLR-2242 would aid to provide with the number of facet terms.