Amazon Web Services 18.11.2015 Yu Xiao
Agenda Introduction to Amazon Web Services(AWS) 7 Steps to Select the Right Architecture for Your Web Applications Private, Public or Hybrid Cloud? AWS Case Study
Amazon Web Services Source: http://varchitectthoughts.files.wordpress.com/2013/02/aws-services1.jpg
AWS Regions Each region is a separate geographic area. Resources aren't replicated across regions unless you do so specifically. EU (Ireland) Region EC2 Availability Zones: 3 Launched 2007 EU (Frankfurt) Region EC2 Availability Zones: 2 Launched 2014
AWS Region List Code ap-northeast-1 ap-southeast-1 ap-southeast-2 eu-central-1 eu-west-1 sa-east-1 us-east-1 us-west-1 us-west-2 Name Asia Pacific (Tokyo) Asia Pacific (Singapore) Asia Pacific (Sydney) EU (Frankfurt) EU (Ireland) South America (Sao Paulo) US East (N. Virginia) US West (N. California) US West (Oregon)
AWS Edge Locations Edge locations are specifically used by Amazon CloudFront (CDN) to distribute content to end users with low latency. They are located in most of the major cities around the world.
Amazon Elastic Compute Cloud (EC2) Amazon EC2 is a web service that provides resizable compute capacity in the cloud. Type Amazon EC2 Minimum Computing Capacity Maximum Computing Capacity Google Compute Engine Minimum Computing Capacity Maximum Computing Capacity General / Standard Purpose 1vCPU/3.75GB memory 8vCPU/30GB Memory 1vCPU/3.75GB Memory 32vCPU/120MB Memory Compute Optimized / High CPU Instance Type 2vCPU/3.75GB Memory 36vCPU/60GB Memory 2vCPU/1.80GB Memory 32vCPU/28.8 Memory Memory Optimized/ High Memory Instance Type 2vCPU/15.25GB Memory 32vCPU/244GB Memory 2vCPU/13GB Memory 32vCPU/208GB Memory Shared Core 1vCPU/1GB Memory 2vCPU/4GB Memory 1vCPU/0.60GB Memory 1vCPU/1.70GB Memory Storage Optimized 4vCPU/30.5GB Memory 32vCPU/244GB Memory N/A N/A GPU Optimized 8vCPU/15GB Memory N/A N/A N/A
Amazon Cloud Storage Amazon Simple Storage Service (S3) provides a web-services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web. Amazon S3 Standard for general-purpose storage of frequently accessed data Amazon S3 Standard - Infrequent Access (Standard - IA) for long-lived, but less frequently accessed data Amazon Glacier is an extremely low-cost storage service that provides secure and durable storage for data archiving and backup.
Amazon Elastic Block Storage (EBS) provides block level storage volumes for use with EC2 instances. Each EBS volume is automatically replicated within its availability zone to protect you from component failure. Google Cloud Storage
Amazon Elastic Load Balancing Elastic Load Balancing automatically distributes incoming application traffic across multiple Amazon EC2 instances in a single Availability Zone or multiple Availability Zones. Elastic Load Balancing also detects the health of EC2 instances. When it detects unhealthy Amazon EC2 instances, it no longer routes traffic to them. Elastic Load Balancing also offers integration with Auto Scaling, which ensures that you have the back-end capacity available to meet varying traffic levels.
Amazon Elastic Load Balancing The load balancers are resources that monitor traffic and handle requests that come in through the Internet. The controller service monitors the load balancers, adds and removes capacity as needed, and verifies that load balancers are behaving properly.
Auto Scaling Auto Scaling helps you maintain application availability and allows you to scale your Amazon EC2 capacity up or down automatically according to conditions you define. You can use Auto Scaling to help ensure that you are running your desired number of Amazon EC2 instances. Auto Scaling can also automatically increase the number of Amazon EC2 instances during demand spikes to maintain performance and decrease capacity during lulls to reduce costs.
Amazon CloudFront CDN Amazon CloudFront can be used to deliver your entire website, including dynamic, static, streaming, and interactive content using a global network of edge locations. Requests for your content are automatically routed to the nearest edge location, so content is delivered with the best possible performance. CloudFront caches content at edge locations for a period of time that you specify.
Cached Object
Non-Cached object
Amazon Route 53 Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service. Latency-based routing Geo DNS Private DNS for Amazon VPC It is designed as an extremely reliable and costeffective way to route visitors to websites by translating domain names (such as www.example.com) into the numeric IP addresses (such as 192.0.2.1) that computers use to connect to each other.
Source: https://www.youtube.com/watch?v=ypwi1ics91y THE 7 STEPS TO SELECT THE RIGHT ARCHITECTURE FOR YOUR WEB APPLICATIONS
Environment you need to run your app Available Scalable Fast access Secure Low cost
Step 1: Is your app dynamic?
Static Websites Static websites serve content directly from the web server s file system exactly as stored. They are used to display content that does not change frequently. Static website uses client-side technologies (such as HTML, CSS, and Javascript) and does not require server-side technologies (such as PHP and ASP.net).
Dynamic Websites Dynamic websites generate content live per each request. WordPress is a popular dynamic web-app framework written in PHP. It is installed on your website s hosting server and needs PHP and a MySQL database to run. Templates execute conditional logic, access other files, and make database queries to generate the final page content. Source: http://nilclass.com/courses/what-is-a-static-website/#9
Static website architecture on AWS Use Amazon S3 to store all the content that makes up your static website. Each file is stored in Amazon S3 as an object in a location called a bucket. Associate your domain name with your website Use Amazon Route 53 to tell the DNS where to find the resources for your domain, such as your website content in Amazon S3. Speed up your website Use Amazon CloudFront to create a CDN that makes your website content available on edge locations.
Step 2: can your web app run on one VM, one VM and one DB, or is it larger?
Step 3: Dynamo DB vs. RDS vs. EC2
Step 3: Dynamo DB vs. RDS vs. EC2 Amazon DynamoDB is a fully managed NoSQL database service. Amazon Relationship Database service (RDS) provides cost-efficient and resizable capacity while managing time-consuming database administration tasks. Amazon EC2: You need to manage the database running in an EC2 instance by yourself.
Step 4: 2-tiers or 3-tiers?
Internal Elastic Load Balancer
Step 5: do you need search functionality in your app?
Amazon CloudSearch
Step 6: Do you need a cache layer?
ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud. It supports two open-source in-memory caching engines, Memcached and Redis.
Step 7: If you are using RDS or EC2 for your DB, does it need to be highly available? What does high-availability mean?
PRIVATE, PUBLIC, HYBRID CLOUD? OR REAL HARDWARE?
Virtualize or not? Private vs. public cloud? Hybrid cloud?
Private, Public or Hybrid Cloud? Source: http://www.dummies.com/how-to/content/comparing-publicprivate-and-hybrid-cloud-computin.html
Private vs. Public cloud Cloud management considerations Initial capital expense Scalability Security and Reliability
A public cloud is the obvious choice when Your standardized workload for applications is used by lots of people, such as e-mail. You need to test and develop application code. You have SaaS (Software as a Service) applications from a vendor who has a well-implemented security strategy. You need incremental capacity (the ability to add computer capacity for peak times). You re doing collaboration projects. You re doing an ad-hoc software development project using a Platform as a Service (PaaS) offering cloud. Many IT department executives are concerned about public cloud security and reliability.
A private cloud is the obvious choice when Your business is your data and your applications. Therefore, control and security are paramount. Your business is part of an industry that must conform to strict security and data privacy issues. Your company is large enough to run a next generation cloud data center efficiently and effectively on its own. To complicate things, the lines between private and public clouds are blurring. For example, some public cloud companies are now offering private versions of their public clouds.
When shall we choose to run the services directly on real hardware? In what situations is a hybrid environment the best option?
Here are a couple of situations where a hybrid environment is best. Your company wants to use a SaaS application but is concerned about security. Your SaaS vendor can create a private cloud just for your company inside their firewall. They provide you with a virtual private network (VPN) for additional security. Your company offers services that are tailored for different vertical markets. You can use a public cloud to interact with the clients but keep their data secured within a private cloud.