Monday, July 13, 2015

AWS EC2 - basics for beginners

What is EC2: 

EC2 is a web service from Amazon which helps the developers / architects to launch virutual machines in a pay as you go mode instead of purchising the required hardwares. 
  • Eliminates the need to invest in hardware upfront. 

Why AWS: 
  • Traditionally, procuring and setting up server is time consuming which can takes weeks or even months. With AWS, you can set things up in mins.
  •  You don’t need to spend your time and resources for managing these servers. 
  • you don’t need to worry about upgrades, you want a better server, just terminate the current one and go for the next better server. 
  • Pay for only what you use, like a electricity meter, you only pay for the no. of hours your server is running. ‘
  • Increase or decrease your size of the instances in minutes. 
  • You have complete control over your instances, you can control the life cycle of the instance using the EC2 management console.

Instance types: 
EC2 instances ranges from small types i.e., micro instances for small jobs to high-performance “x-large” jobs. You have to choose the instance types that matches your requirement. 

These instance types are optimised to fit different use cases. 
Some instance types: 
  • T2: burstable performance instances (provide base level of CPU performance, ability to burst above baseline. Good for use cases that don’t use the full CPU.
Use cases: Dev environments, build servers, code repositories, low traffic web applications, small databases. 

  • M3: provides a balance of compute memory and network resources - good choice for many applications. 
  • C4: latest generation - compute optimised instances - highest performing processors / lowest price/compute performance. 

Memory optimised: 
  • R3: optimized for memory intensive application, 

GPU: 
G2: intended for graphics and general purpose GPU compute applications. 

Storage optimized: 
I2 - High I/O instances, high storage instances that provide very fast SSD-backed instance storage optimised for high random I/O performance and privide high IOPS at a low cost. 

Dense storage instances: 
D2: features up to 48 TB of HDD based local storage, deliver high disk throughput. 


How about security: 
You can choose Virtual private cloud or other AWS services depending upon your requirement to improve security. 


Will it auto scale: 
Yes. you need to use elastic load balancing for that.  


How pricing works: 
There are different types of pricing methods: 
  • On-demand pricing.
With on-demand pricing, you don’t have any long term commitments. You only pay for the amount t
You can buy and pay hourly instead of long term comm
  • Reserved instances. 
With reserved instances, you pay an upfront fee and get a discount on the per hour usage of the instances. If you are sure you are going to run a server for a longer period of time, you can go for a reserved instance. 

  • Spot instances: 
This options lets you define what price you want to pay for your instances and by following a bidding approach, you will get your servers based on the bid. 


Some AWS basic terms: 

Elastic IP Address: are static IP addresses that are tied to account and not an instance. The instance can be mapped to static IP addresses. 

Autoscaling: Lets you automatically scale up or down on the instances according to the conditions you define. This will ensure you don’t pay too much for the instances when the traffic is actually less. 

Elastic Load balancing: Automatically distribute incoming application traffic across multiple AWS EC2 instances. 


Characteristics: 
  • CPU
  • Memory
  • Storage
  • GPU



No comments:

Post a Comment