• Aucun résultat trouvé

Développement logiciel pour le Cloud (TLC)

N/A
N/A
Protected

Academic year: 2022

Partager "Développement logiciel pour le Cloud (TLC)"

Copied!
16
0
0

Texte intégral

(1)

Développement logiciel pour le Cloud (TLC)

2. PaaS: the example of ConPaaS

Guillaume Pierre

Université de Rennes 1

Fall 2012

http://www.globule.org/~gpierre/

Développement logiciel pour le Cloud (TLC) 1 / 38

Table of Contents

1 Introduction

2 ConPaaS usage

3 ConPaaS architecture

4 Performance control

5 Conclusion

Développement logiciel pour le Cloud (TLC) 2 / 38

Table of Contents

1 Introduction

2 ConPaaS usage

3 ConPaaS architecture

4 Performance control

5 Conclusion

Développement logiciel pour le Cloud (TLC) Introduction 1 / 38

Typical Cloud Applications (according to AWS)

Application Hosting Backup and Storage Content Delivery E-Commerce

High Performance Computing Media Hosting

On-Demand Workforce Search Engines

Web Hosting

Développement logiciel pour le Cloud (TLC) Introduction 2 / 38

(2)

Applications running at Amazon Web Services

Sample: 50 applications from the AWS Customer App Catalog.

Développement logiciel pour le Cloud (TLC) Introduction 3 / 38

Many Cloud applications are alike

Web servers Application servers Database servers

High-performance frameworks (MapReduce, MPI, Workows) . . . and a few percents of miscellaneous programs

Cloud application developers often rebuild

the same types of frameworks again and again and again. . .

Développement logiciel pour le Cloud (TLC) Introduction 4 / 38

Can the Cloud help support common types of applications?

Infrastructure-as-a-Service provides basic computing resources

I Absolute exibility: you can build anything you want

I But it can be very complex and time consuming

F Deployment

F Software upgrades

F Fault-tolerance

F Performance monitoring

F Resource provisioning

F Dynamic reconguration orchestration

F etc.

Platform-as-a-Service provides high-level services

I Each PaaS service targets a specic family of applications

I Provide a simple deployment environment for applications

I Provide high-level guarantees for applications using these services

Développement logiciel pour le Cloud (TLC) Introduction 5 / 38

Main PaaS environments

Google AppEngine Microsoft Azure Amazon Beanstalk RightScale

OpenShift ConPaaS etc.

Dierent PaaS environments address dierent types of applications

Développement logiciel pour le Cloud (TLC) Introduction 6 / 38

(3)

ConPaaS in a nutshell

Broad range of functionalities

I Application servers, databases, high-performance computing, other Fully integrated

I Applications can compose any set of services together Easy to use but also very powerful

I Simple Web GUI + powerful command-line tool

I Services are highly customizable

Cutting-edge SLA enforcement technologies

I Elasticity and resource provisioning techniques to guarantee performance at the lowest possible cost

Runs over Amazon EC2 and OpenNebula Open-source

http://www.conpaas.eu

Développement logiciel pour le Cloud (TLC) Introduction 7 / 38

Table of Contents

1 Introduction

2 ConPaaS usage

3 ConPaaS architecture

4 Performance control

5 Conclusion

Développement logiciel pour le Cloud (TLC) ConPaaS usage 8 / 38

ConPaaS Applications

A ConPaaS application is dened as a composition of multiple service instances

For example: web hosting service + MySQL database + logging service (to store access logs)

PHP service (using 1 or more machine instances)

Logging service (using 1 or more machine instances)

End user

SQL data service (using 1 or more machine instances)

Développement logiciel pour le Cloud (TLC) ConPaaS usage 9 / 38

ConPaaS Services

Web hosting (PHP, Java) Databases (MySQL, Scalarix) File system (XtreemFS)

High-performance computations (MapReduce, TaskFarming) Functional testing (Selenium)

Développement logiciel pour le Cloud (TLC) ConPaaS usage 10 / 38

(4)

ConPaaS Operation

Users access ConPaaS thanks to a Web interface

I Login

I Start new services (i.e., start a standard VM image with the service implementation)

I Manage existing services (i.e., communicate with the service's manager to issue commands)

I Stop services (i.e., stop all service instances except the service manager)

I Terminate services (i.e., destroy a service completely) An extended set of functionalities is available through a command-line interface

I All commands from the Web interface are available (except starting a new service)

I Additional commands may be implemented for expert users

I The command-line interface makes it easy to script service management

Développement logiciel pour le Cloud (TLC) ConPaaS usage 11 / 38

The ConPaaS Front-End

Développement logiciel pour le Cloud (TLC) ConPaaS usage 12 / 38

The ConPaaS Front-End

Développement logiciel pour le Cloud (TLC) ConPaaS usage 12 / 38

The ConPaaS Front-End

Développement logiciel pour le Cloud (TLC) ConPaaS usage 12 / 38

(5)

The ConPaaS Front-End

Développement logiciel pour le Cloud (TLC) ConPaaS usage 12 / 38

The ConPaaS Front-End

Développement logiciel pour le Cloud (TLC) ConPaaS usage 12 / 38

The ConPaaS Front-End

Développement logiciel pour le Cloud (TLC) ConPaaS usage 12 / 38

The ConPaaS Front-End

Développement logiciel pour le Cloud (TLC) ConPaaS usage 12 / 38

(6)

The ConPaaS Front-End

Développement logiciel pour le Cloud (TLC) ConPaaS usage 12 / 38

Uploading new application versions

Développement logiciel pour le Cloud (TLC) ConPaaS usage 13 / 38

Uploading new application versions

Développement logiciel pour le Cloud (TLC) ConPaaS usage 13 / 38

Uploading new application versions

Développement logiciel pour le Cloud (TLC) ConPaaS usage 13 / 38

(7)

Scaling a service

Développement logiciel pour le Cloud (TLC) ConPaaS usage 14 / 38

Scaling a service

Développement logiciel pour le Cloud (TLC) ConPaaS usage 14 / 38

The ConPaaS command-line interface

Développement logiciel pour le Cloud (TLC) ConPaaS usage 15 / 38

The ConPaaS command-line interface

Développement logiciel pour le Cloud (TLC) ConPaaS usage 15 / 38

(8)

The ConPaaS command-line interface

Développement logiciel pour le Cloud (TLC) ConPaaS usage 15 / 38

Table of Contents

1 Introduction

2 ConPaaS usage

3 ConPaaS architecture

4 Performance control

5 Conclusion

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 16 / 38

Architecture of a ConPaaS service

A ConPaaS service is implemented as one or more virtual machine instances dedicated to a single user

I Single-tenant: each VM belongs to a single user

I No VM sharing between services (even for the same user)

ConPaaS services are elastic: we can grow/shrink their capacity at runtime with no service disruption

I Horizontal provisioning: add/remove virtual machines

ConPaaS services will support dynamic resource provisioning:

automatic capacity adjustment to support performance guarantees at minimum cost

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 17 / 38

ConPaaS Organization

Load Balancer

PHP servers (dynamic

pages) Web servers

(static pages) PHP service

Manager

Load Balancer

MySQL slaves MySQL

master MySQL service

Manager Front-

end Logic Front-

end GUI

End users

Service admin

PHP service

MySQL service

Control plane Data plane

Virtual machine

Management traffic Application trafic Legend

conpaasDéveloppement logiciel pour le Cloud (TLC) ConPaaS architecture 18 / 38

(9)

ConPaaS Organization

Load Balancer

PHP servers (dynamic pages) Web servers

(static pages) PHP service

Manager

Load Balancer

MySQL slaves MySQL

master MySQL service

Manager Front-

end Logic Front-

end GUI

End users

Service admin

PHP service

MySQL service

Control plane Data plane

Virtual machine

Management traffic Application trafic Legend

Each manager VM contains a manager process Each agent VM contains an agent process

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 19 / 38

Lifecycle of a ConPaaS service

No service

Service created

(1 manager VM)

Service started

(1 manager VM + N agent VMs)

Scale up/down

Service−specific operations Terminate

Create

Stop Start

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 20 / 38

The Web hosting service

The service exists in two versions: PHP and Java Initially the service has 2 VMs

I 1 VM running the manager

I 1 VM running a load balancer, a web server and a PHP backend When adding VMs each VM becomes specialized (load balancer VMs, web server VMs, PHP backend VMs)

Proxy Web PHP Manager

Web Manager Proxy Web

PHP Manager Proxy

PHP

Proxy

Web PHP

Manager +1 Web

+1 PHP +1 PHP

+1 PHP

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 21 / 38

Session handling in the PHP service

PHP has built-in support for sessions

I Normally stored in main memory of the PHP server

We must share session state between multiple PHP backends (otherwise users would logout at each request)

I We use the Scalaris key-value store for that

I One Scalaris server inside the manager VM

Making use of the Scalaris session storage is totally transparent to the applications

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 22 / 38

(10)

What we want to avoid

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 23 / 38

Service reconguration

When the user scales the service up:

1 The front-end sends a request to the service manager to scale up

2 The service manager creates a new VM with proper contextualization information, then starts polling

3 The agent VM boots, then starts its manager process

4 When the manager establishes a connection with the agent, it requests it to start one or more roles

5 The manager uploads code/data as necessary

6 The manager recongures other VMs as necessary

When scaling down:

I Same story in opposite order

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 24 / 38

Building new ConPaaS services

Building new ConPaaS services from scratch was:::::::HARD

I Build a proper VM image with contextualization

I Develop new manager and agent deamons

I Implement a standardized protocol between the front-end and the agents

I All communication goes over SSL with custom security checks

Solution: the service core

I All ConPaaS services use a single VM image

I All ConPaaS services use the same manager and agent deamons

I The service core implements shared functionality between all services

F Start/stop/contextualize virtual machines

F Secure communication primitives

F Performance monitoring mechanisms

I Each service can specialize the service core

F Implement the service-specic parts

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 25 / 38

Structure of a service implementation

Building a new ConPaaS service from the service core is:::::now:::::::EASY:

I (optional) Provide shell scripts to be executed when VMs start and stop

I Write a manager and an agent class in Python

I Extend one Python le to register the new service

I Extend the front-end with one service-specic page in PHP

Adding functionality to all services is quite easy as well

I Secure internal communication

I Support for new clouds

I Performance monitoring

Développement logiciel pour le Cloud (TLC) ConPaaS architecture 26 / 38

(11)

Table of Contents

1 Introduction

2 ConPaaS usage

3 ConPaaS architecture

4 Performance control

5 Conclusion

Développement logiciel pour le Cloud (TLC) Performance control 27 / 38

The varying capacity problem

0 200 400 600 800 1000 1200 1400

Mon 09/17/07

Wed 09/19/07

Fri 09/21/07

Sun 09/23/07

Tue 09/25/07

Thu 09/27/07

Sat 09/29/07

Mon 10/01/07

Wed 10/03/07

Requests/second

Time

Développement logiciel pour le Cloud (TLC) Performance control 28 / 38

The varying capacity problem

0 200 400 600 800 1000 1200 1400

Mon 09/17/07 Wed

09/19/07 Fri 09/21/07 Sun

09/23/07 Tue 09/25/07 Thu

09/27/07 Sat 09/29/07 Mon

10/01/07 Wed 10/03/07

Requests/second

Time

Static provisioning

Développement logiciel pour le Cloud (TLC) Performance control 28 / 38

The varying capacity problem

0 200 400 600 800 1000 1200 1400

Mon 09/17/07 Wed

09/19/07 Fri 09/21/07 Sun

09/23/07 Tue 09/25/07 Thu

09/27/07 Sat 09/29/07 Mon

10/01/07 Wed 10/03/07

Requests/second

Time

Dynamic provisioning

Développement logiciel pour le Cloud (TLC) Performance control 28 / 38

(12)

Dynamic resource provisioning

Response time

Time SLO

Développement logiciel pour le Cloud (TLC) Performance control 29 / 38

Dynamic resource provisioning

Response time

Time SLO

Développement logiciel pour le Cloud (TLC) Performance control 29 / 38

Dynamic resource provisioning

resource Add new Response time

Time SLO

Développement logiciel pour le Cloud (TLC) Performance control 29 / 38

Dynamic resource provisioning

resource Add new

decreasesTraffic Response time

Time SLO

Développement logiciel pour le Cloud (TLC) Performance control 29 / 38

(13)

Dynamic resource provisioning

resource Add new

decreasesTraffic

Release resource without violating

the SLO Response time

Time SLO

Développement logiciel pour le Cloud (TLC) Performance control 29 / 38

Web applications in the textbooks

Développement logiciel pour le Cloud (TLC) Performance control 30 / 38

Web applications in the real world

Développement logiciel pour le Cloud (TLC) Performance control 31 / 38

Web applications in the real world

Advertisement service Customer

service

service promotion Real−time

More than 100 services are called to collect data and construct the Amazon.com gateway page. Werner Vogels, Amazon CTO.

Développement logiciel pour le Cloud (TLC) Performance control 31 / 38

(14)

Provisioning in a multi-service Web application

Développement logiciel pour le Cloud (TLC) Performance control 32 / 38

Provisioning in a multi-service Web application

When the application needs more capacity, where should I place extra resources?

Développement logiciel pour le Cloud (TLC) Performance control 33 / 38

Possible solutions

Classical solution: impose an SLO to each service individually Each service can be scaled in isolation

Which SLO should we set for backend services?

Overall performance is suboptimal

Our solution: impose an SLO to the front-end service only

I No particular performance constraint for the other services

I All services collaborate to maintain the front-end's performance at minimum cost

Développement logiciel pour le Cloud (TLC) Performance control 34 / 38

Collaborative resource provisioning

2 1

3 4

Observed response time: 510 ms

1 machine

1 machine

1 machine 1 machine

Développement logiciel pour le Cloud (TLC) Performance control 35 / 38

(15)

Collaborative resource provisioning

2 1

3 4

Observed response time: 510 ms

1 machine

1 machine

1 machine 1 machine

+1 extra machine Predicted: 505 ms

Développement logiciel pour le Cloud (TLC) Performance control 35 / 38

Collaborative resource provisioning

2 1

3 4

Observed response time: 510 ms

1 machine

1 machine

1 machine 1 machine

+1 extra machine Predicted: 480 ms

Développement logiciel pour le Cloud (TLC) Performance control 35 / 38

Collaborative resource provisioning

2 1

3 4

Observed response time: 510 ms

1 machine

1 machine

1 machine 1 machine

Predicted: 410 ms

+1 extra machine

Développement logiciel pour le Cloud (TLC) Performance control 35 / 38

Collaborative resource provisioning

2 1

3 4

Observed response time: 510 ms

1 machine

1 machine

1 machine 1 machine

Predicted: 450 ms

+1 extra machine

Best choice: add a machine at service 3

Développement logiciel pour le Cloud (TLC) Performance control 35 / 38

(16)

Table of Contents

1 Introduction

2 ConPaaS usage

3 ConPaaS architecture

4 Performance control

5 Conclusion

Développement logiciel pour le Cloud (TLC) Conclusion 36 / 38

Conclusion

ConPaaS is a platform-as-a-service environment

I Designed to facilitate elastic application hosting in the cloud

I Designed to be easily extensible

ConPaaS addresses two major classes of applications:

I Web applications

I Scientic applications

I Combinations of both

We will use ConPaaS for practical assignments

www.conpaas.eu

Développement logiciel pour le Cloud (TLC) Conclusion 37 / 38

Credits

Ismail El Helw

(server side) Adriana Szekeres (server side)

Emanuele Rocca

(server side) Claudiu Gheorghe (Web GUI)

Développement logiciel pour le Cloud (TLC) Conclusion 38 / 38

Références

Documents relatifs

Dans le cadre du cloud privé dédié aux services internes, nous avons choisi de considérer qu'une machine virtuelle était identique à un serveur physique pour ce qui concerne

Five of the ten SNPs were selected because of an association with eGFR at P , 0.05 in the first replication meta-analysis and with the same direction of effect as in the WGHS

Le cas d’utilisation démarre quand (1) le client introduit sa carte bancaire, (2) le système lit la carte et vérifie si la carte est valide, (3) le système demande au client de

Pour réaliser cela, on a écrit une fonction verifierCode() qui reçoit en paramètre la chaîne de caractère représentant le code postal et qui retourne true si le code est valide

Edge computing originated from research efforts on Cloudlets, which propose to deploy a specific infrastructure at the edge of mobile networks to support dynamic application

L’idéal nul est un idéal premier minimal, il correspond donc à un point générique de SpecA. C’est aussi l’unique point générique sur SpecA L’adhérence du point générique

[r]

La suite logique de cette fonction étant la conception d'un système permettant de générer facilement plusieurs fichiers "bâtiment" en faisant varier la valeur U