Middleware and Web Services Lecture 11: Cloud Computing Concepts



Similar documents
DISTRIBUTED SYSTEMS [COMP9243] Lecture 9a: Cloud Computing WHAT IS CLOUD COMPUTING? 2

Topics. 1. What is load balancing? 2. Load balancing techniques 3. Load balancing strategies 4. Sessions 5. Elastic load balancing

Cloud computing - Architecting in the cloud

BASICS OF SCALING: LOAD BALANCERS

3/21/2011. Topics. What is load balancing? Load Balancing

CHAPTER 8 CLOUD COMPUTING

Chapter 11 Cloud Application Development

LBA API Manual Ver.1.0.1

Lets SAAS-ify that Desktop Application

Performance Management for Cloudbased STC 2012

CS 188/219. Scalable Internet Services Andrew Mutz October 8, 2015

Web Application Hosting Cloud Architecture

How To Scale A Server Farm

Elastic Load Balancing. API Reference API Version

Cloud Computing Trends

Elastic Load Balancing. API Reference API Version

Scale Out! Building Internet-Scale Web Platforms with the Amazon Elastic Load Balancer (ELB)

Web Application Deployment in the Cloud Using Amazon Web Services From Infancy to Maturity

PES. High Availability Load Balancing in the Agile Infrastructure. Platform & Engineering Services. HEPiX Bologna, April 2013

Session 3. the Cloud Stack, SaaS, PaaS, IaaS

TECHNOLOGY WHITE PAPER Jun 2012

Scaling in the Cloud with AWS. By: Eli White (CTO & mojolive) eliw.com - mojolive.com

IaaS Cloud Architectures: Virtualized Data Centers to Federated Cloud Infrastructures

Scaling Analysis Services in the Cloud

Cloud Computing and Amazon Web Services. CJUG March, 2009 Tom Malaher

Amazon Web Services Primer. William Strickland COP 6938 Fall 2012 University of Central Florida

Design for Failure High Availability Architectures using AWS

Scaling Applications on the Cloud

High Performance Applications over the Cloud: Gains and Losses

Architecting ColdFusion For Scalability And High Availability. Ryan Stewart Platform Evangelist

HDMQ :Towards In-Order and Exactly-Once Delivery using Hierarchical Distributed Message Queues. Dharmit Patel Faraj Khasib Shiva Srivastava

Scalability of web applications. CSCI 470: Web Science Keith Vertanen

When talking about hosting

Performance Management for Cloud-based Applications STC 2012

CUMULUX WHICH CLOUD PLATFORM IS RIGHT FOR YOU? COMPARING CLOUD PLATFORMS. Review Business and Technology Series

CDBMS Physical Layer issue: Load Balancing

Efficient Network Marketing - Fabien Hermenier A.M.a.a.a.C.

System Models for Distributed and Cloud Computing

Cloud Computing and Amazon Web Services

Cloud Computing Disaster Recovery (DR)

Cloud Models and Platforms

Architecting for the cloud designing for scalability in cloud-based applications

Cluster Computing. ! Fault tolerance. ! Stateless. ! Throughput. ! Stateful. ! Response time. Architectures. Stateless vs. Stateful.

CONSUL AS A MONITORING SERVICE

Cloud Computing Summary and Preparation for Examination

Chapter 19 Cloud Computing for Multimedia Services

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

DNS ROUND ROBIN HIGH-AVAILABILITY LOAD SHARING

How To Cloud Compute At The Cloud At The Cyclone Center For Cnc

TECHNOLOGY WHITE PAPER Jan 2016

IERG 4080 Building Scalable Internet-based Services

Reference Model for Cloud Applications CONSIDERATIONS FOR SW VENDORS BUILDING A SAAS SOLUTION

DESIGN OF A PLATFORM OF VIRTUAL SERVICE CONTAINERS FOR SERVICE ORIENTED CLOUD COMPUTING. Carlos de Alfonso Andrés García Vicente Hernández

DISTRIBUTED SYSTEMS AND CLOUD COMPUTING. A Comparative Study

Technology and Cost Considerations for Cloud Deployment: Amazon Elastic Compute Cloud (EC2) Case Study

from programmer s point of view

Cloud Computing. Adam Barker

CumuLogic Load Balancer Overview Guide. March CumuLogic Load Balancer Overview Guide 1

Datacenter Operating Systems

The Cisco Powered Network Cloud: An Exciting Managed Services Opportunity

Fault-Tolerant Computer System Design ECE 695/CS 590. Putting it All Together

Architecting For Failure Why Cloud Architecture is Different! Michael Stiefel

Web Application Hosting in the AWS Cloud Best Practices

Public Cloud Offerings and Private Cloud Options. Week 2 Lecture 4. M. Ali Babar

Amazon Web Services Yu Xiao

A Middleware Strategy to Survive Compute Peak Loads in Cloud

Deploying a Geospatial Cloud

A Comparison of Clouds: Amazon Web Services, Windows Azure, Google Cloud Platform, VMWare and Others (Fall 2012)

Load Balancing Advanced Operation Manual

Resource Utilization of Middleware Components in Embedded Systems

Introduction to Cloud Computing

Cloud-based Infrastructures. Serving INSPIRE needs

Cloud Computing: Making the right choices

A Comparative Study Of Cloud Environments and the Development of a Framework for the Automatic Deployment of Scalable Cloud-Based Applications

Advanced Computer Networks. Layer-7-Switching and Loadbalancing

Scalable Architecture on Amazon AWS Cloud

Multilevel Communication Aware Approach for Load Balancing

CloudCmp:Comparing Cloud Providers. Raja Abhinay Moparthi

ABSTRACT. KEYWORDS: Cloud Computing, Load Balancing, Scheduling Algorithms, FCFS, Group-Based Scheduling Algorithm

CS514: Intermediate Course in Computer Systems

Amazon EC2 Product Details Page 1 of 5


E-Business Technology

Network performance in virtual infrastructures

Logentries Insights: The State of Log Management & Analytics for AWS

LinuxWorld Conference & Expo Server Farms and XML Web Services

Cloud Based E-Government: Benefits and Challenges

Deployment Guide AX Series with Active Directory Federation Services 2.0 and Office 365

Economics and Elasticity Challenges of Deploying Application on Cloud

COMLINK Cloud Technical Specification Guide DEDICATED SERVER

Cloud Computing. Cloud computing:

Service Component Architecture for Building Cloud Services

Web Application Hosting in the AWS Cloud Best Practices

INTRODUCTION TO CLOUD COMPUTING CEN483 PARALLEL AND DISTRIBUTED SYSTEMS

Primex Wireless OneVue Architecture Statement

From Internet Data Centers to Data Centers in the Cloud

There Are Clouds In Your Future. Jeff Barr Amazon Web (Twitter)

What s New with VMware vcloud Director 5.1

Transcription:

Middleware and Web Services Lecture 11: Cloud Computing Concepts doc. Ing. Tomáš Vitvar, Ph.D. tomas@vitvar.com @TomasVitvar http://vitvar.com Czech Technical University in Prague Faculty of Information Technologies Software and Web Engineering http://vitvar.com/courses/mdw Modified: Mon Dec 12 2011, 22:31:47 Humla v0.2.2 Overview Cloud Computing Cloud Layers Service Performance Load Balancer Messaging Systems Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 2

Traditional Solution to Infrastructure Traditional hardware model Up-front hardware investments Hardware not optimally utilized Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 3 Cloud Solution to Infrastructure Cloud computing model No up-front hardware investments Hardware optimally utilized Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 4

Cloud Computing Outsourcing of application infrastructure Reliability and availability Low costs pay-as-you-go Elasticity can dynamically grow with your apps Different way of thinking Got your grand mum's savings under your pillow? probably not, you better have them in your bank Data is your major asset you better have them in a "bank" too Someone can abuse your data? banks bankrupt too, sometimes it is a risk you take there is a market and a competition Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 5 What is a Cloud? Any app you access over the web? A datacenter? Offers virtualization Any company having a datacenter wants to move to Three layers: IaaS, PaaS, SaaS access programmatically, pay-as-you-go, low up-front costs, initial version for free, micro payments etc. Cloud computing offers services scalability, storage Possible to configure programmatically integration to enterprise administration processes usually REST interface Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 6

Overview Cloud Computing Cloud Layers Service Performance Load Balancer Messaging Systems Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 7 Web 2.0 App Architecture Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 8

Move to the Cloud: IaaS Infrastructure as a Service Services for application providers Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 9 Move to the Cloud: PaaS Platform as a Service Services for application providers Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 10

Move to the Cloud: SaaS Software as a Service Services for end-users Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 11 Cloud Computing Services Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 12

Overview Cloud Computing Service Performance Load Balancer Messaging Systems Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 13 Good Performance Scalability server scalability ability of a server to react on changes in loads a user should not feel the change in loads horizontal and vertical scaling network traffic not all about network bandwidth capacity service needs to limit the network traffic through caching Availability probability that a service is operational at a particular time e.g., 99.9987% availability downtime ~44 seconds/year Metrics Latency Queries per Second (QPS) Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 14

Latency High latency influenced by CPU intensive service or a bad implementation of a service consider asynchronous processing when CPU intensive Writing to a data store No or bad caching mechanism even if data changes often, with high QPS caching improves a lot stateful service implementation may have influence too Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 15 CPU Time The time a CPU spends on executing a service CPU Time influences latency of your service your bills you pay for running the service Reference CPU system's infrastructures are complex, times may vary all times calculated wrt this CPU billing on a reference CPU in the cloud Example in GAE: 1.2GHz CPU, 3600 MIPS (3 instructions per cycle) How to determine CPU time profiling (depends on programming environment) analysis of service's computational complexity Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 16

Profiling in GAE Example profiling code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 //,QuotaService,gives,us,an,access,to,CPU,cycles, QuotaService,qs,=,QuotaServiceFactory.getQuotaService();, //,initialization //,10000,numbers;,worstKcase,scenario,K,in,reverse,order int[],a,=,new,int[10000]; for,(int,i,=,0;,i,<,a.length;,i++),,,,a[i],=,a.length,k,i;, //,current,number,of,cycles, long,start,=,qs.getcputimeinmegacycles();, //,insertion,sort insertionsort(a);, //,current,number,of,cycles long,end,=,qs.getcputimeinmegacycles(); Analysis Number of CPU mega cycles is in mega cycles, 1200 mega cycles is 1 CPU second Total CPU seconds for the insertion sort Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 17 Service Analysis Running time are constant factors (independent on ) for functions with complexity, describes worst-case running time CPU-intensive functions: large Constant factors overhead costs when running the function: (a) denotes efficiency of function's algorithm implementation, (b) denotes one-time costs such as reading, writing, serializing data, simple calculations Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 18

CPU Seconds Running time in CPU seconds where is a CPU's Million Instructions per Second (MIPS) Example (function analysis) sort 10,000 items using insertion sort on a 1.2 GHz x86 CPU with 3 instructions per clock cycle (~ 3600 MIPS) insertion sort complexity is (~12 instructions per operation in avarage), (no additional costs) CPU Time in seconds: Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 19 Overview Cloud Computing Service Performance Load Balancer Messaging Systems Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 20

Load Balancer Distributes the load to multiple app instances App instances run on different machines Load sharing: equal or with preferences Health checks Types DNS-based load balancer DNS Round Robin NAT-based load balancer app protocol layer HTTP Sticky-sessions Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 21 DNS-based Load Balancer DNS Round Robin Very first load balancing mechanism A DNS record has multiple assigned IP addresses DNS system delivers different IP addresses from the list Example DNS A Record: moon.com,a,147.32.100.71,147.32.100.72,147.32.100.73 Advantages Very simple, easy to implement Disadvantages IP address in cache, could take hours to re-assign No information about servers' loads and health Variation of DNS Round robin a load balancer assigns domain names each domain has a different IP in DNS a health-check is possible, IP re-assignment problem remains Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 22

NAT-based Load Balancer Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 23 Load Balancer Configuration API CreateLoadBalancer LoadBalancerName unique name of the load balancer Protocol protocol such as HTTP LoadBalancerPort port on which LB listens for incoming requests InstancePort app instance TCP port such as 8080 ConfigureHealthCheck LoadBalancerName name of existing LB Target in a form of HTTP:port/PathToPing Interval amount of seconds to perform health checks Timeout amount of seconds when no response to health check endpoint means unhealthy app instance HealthyThreshold number of successful health checks that will mark the app instance as healthy UnhealthyThreshold number of unsuccessful health checks that mark the app instance as unhealthy RegisterInstancesWithLoadBalancer LoadBalancerName name of existing LB Instances app instances to put to the pool Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 24

App Instance Usage Sticky sessions Identified by cookies created by the load balancer Information in the request about the app instance Steps to chose an app instance to serve the request if a sticky session exists to an app instance always use that app instance if a sticky session does not exist Use round robin for the next app instance health check if a number of health checks exceeds the unhealthy threshold discard the app from the list if an app was unhealthy and a number of health checks exceeds the healthy threshold add the app to the list Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 25 Scalability Scaling Up Number of users increases, need for more resources Replication of app instances Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 26

Scalability Scaling Down Number of users decreases, no need for many resources Deleting app instances Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 27 Scaling Down Issues Session in a persistent storage Stateful server No sticky sessions auto scaling GAE implementation New or updated session data written to BigTable and the memcache Reading the data only from the cache, is fast Limitations on data writing GAE allows to update a single entity 5 times/sec. When QPS > 5 (GAE scales up to 500 QPS) the latency grows Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 28

Example Application Scalability Response times QPS for reading (R) and writing (W) Writing scales well up to 5 QPS Reading scales well for all QPS Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 29 Overview Cloud Computing Service Performance Load Balancer Messaging Systems Message Queues Publish/Subscribe Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 30

Messaging Systems Messaging Middleware aka Message-Oriented Middleware (MOM) Message consumer and message producer asynchronous communication "anonymity" between producers and consumers no matter who, where, when a msg was produced Ensures reliability, scalability Loose coupling of applications a kind of "peer-to-peer" relationship between applications Two types (Messaging Domains) Point-to-Point (message queue MQ) Publish/Subscribe (event-based) Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 31 MQ System a "1 : 1" relationship between producer and consumer one message must be processed by one consumer no time-dependency between message producer and consumer consumer does not need to exist when producer sends a message Message exists in the queue until it is used by a consumer message consumers take as many messages as they are able to serve Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 32

MQ API createqueue creates a queue in the MQ system called by the message producer sendmessage send a message to the queue called by the message producer receivemessage request to receive (read) a message from the queue called by the message consumer deletemessage deletes a message from the queue called by the message consumer when the message is successfully processed Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 33 Message Consumption from the Queue Amazon Simple Queue System (SQS), part of EC2 message consumers may fail anytime multiple instances of message consumers increases reliability visibility timeout time during which the message exist in the queue, and need to be deleted by the consumer (~ 30 seconds in SQS) Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 34

Overview Cloud Computing Service Performance Load Balancer Messaging Systems Message Queues Publish/Subscribe Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 35 Publish/Subscribe System occurrence of a message = event that triggers one or more processes a "1 : N" relationship between producer and consumer one message can be processed by many different subscribers time-dependency between publisher and subscriber subscriber must first subscribe to a topic and then publisher can publish a message under that topic a message is deleted when all its subscribers consume it Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 36

Publish/Subscribe API lookuptopic lookups or creates a topic called by the subscriber first and then by the publisher receivemessage request to receive (read) a message under the topic called by the subscriber Implementation specific: synchronous blocking, with timeout asynchronous through event listener publishmessage publishes a message under the topic called by the publisher Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 37 Event-driven Communication Event Occurrence of a message with certain topic Event-driven Process events trigger actions one event may trigger more actions loose coupling not all actions need to be known at design time Service Oriented Architectures (SOA) Event-Driven Architectures (EDA) new trends in realization of SOA Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 38

Event-driven Process Example Conceptual process Event-driven process implementation Lecture 11: Cloud Computing Concepts, CTU Winter Semester 2011/2012, @TomasVitvar 39