Download as pdf or txt
Download as pdf or txt
You are on page 1of 132

Université

de Tunis El Manar
Ecole Na/onale d’Ingénieurs de Tunis

Département TIC

Op/on I3C
(Infrastructures Convergées & Cloud Compu/ng)

3ème année Télécommunica/ons
A.U 2020-2021

Ges$on de Réseaux et de Service dans le Cloud
Compu$ng
I.ELLOUMI
Plan
• G a t h e r i n g d a t a
Introduc$on
Cloud monitoring
as source for
Cloud Infrastructures
processing
IaaS, PaaS, SaaS : offers & Technologies
• Processing will create insight
Edge Compu$ng • Basis for many purposes on provider
Fog Compu$ng and client
Egde Mobile Compu$ng (EMC) Three pillars
Quality of Service • Logs
.
Networks • Metrics
①  Amazon Web Services • Traces
②  MS Azure Collection
③  OpenStack • Collect what is available / Future usage

unpredictable
• Be aware of the overheads
Cloud Applica$on Development • Techniques
for overhead reduction
Design aspects OpenStack
Service based applica$ons Architecture
Data centric applica$ons Implementa$on (Opera$ons and troubleshoo$ng /
Distributed Tracing with OpenStack…)
Cloud applica$on engineering
Scalability and elasticity of Cloud Applications
2
①  Amazon Web Services
1.  Elas$c Compute Cloud (Amazon EC2)
2.  Simple Storage Service (Amazon S3)
3.  Simple Queue Service (Amazon SQS)
4.  CloudFront
5.  SimpleDB

6.  Amazon Lambda
h_p://aws.amazon.com

②  MS Azure
1.  Azure provides IaaS and PaaS
2.  Web app and Service Fabric simplify deployment of
applica$ons into the cloud.
3.  Special support for integra$ng on-premise and cloud
resources

I.ELLOUMI-- I3C -- novembre 16, 2020 3
Cloud Compu$ng
Access to IT services over the Internet

I.ELLOUMI-- I3C -- novembre 16, 2020 4


26 12 6
I.ELLOUMI-- I3C -- novembre 16, 2020 5
Cloud Compu$ng
5 characteris$cs:

1.  On-demand Self-service
A consumer can unilaterally provision compu$ng capabili$es, such as « server $me » and « network storage », as needed
automa$cally without requiring human interac$on with each service provider.

2.  Broad Network Access
Capabili$es are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or
thick client plaeorms (e.g., mobile phones, tablets, laptops, and worksta$ons).

3.  Resource Pooling
The provider’s compu$ng resources are pooled to serve mul$ple consumers using a mul$-tenant model, with different physical and
virtual resources dynamically assigned and reassigned according to consumer demand. There is a sense of loca$on independence in
that the customer generally has no control or knowledge over the exact loca$on of the provided resources but may be able to specify
loca$on at a higher level of abstrac$on (e.g., country, state, or datacenter). Examples of resources include storage, processing,
memory, and network bandwidth.

4.  Rapid Elas$city and Scalability
Capabili$es can be elas$cally provisioned and released, in some cases automa$cally, to scale rapidly outward and inward
commensurate with demand. To the consumer, the capabili$es available for provisioning ogen appear to be unlimited and can be
appropriated in any quan$ty at any $me


5.  Measured Service
Cloud systems automa$cally control and op$mize resource use by leveraging a metering capability at some level of abstrac$on
appropriate to the type of service (e.g., storage, processing, bandwidth, and ac$ve user accounts). Resource usage can be monitored,
controlled, and reported, providing transparency for both the provider and consumer of the u$lized service.
6

I.ELLOUMI-- I3C -- novembre 16, 2020
Cloud Compu$ng: IT as a Service

• 

Expand tradi$onal e-commerce in the Internet to IT structures
•  Rent from a virtual storefront the basic necessi$es to build a
virtual data center
–  Ressources: CPU, mémoire, stockage, mise en réseau
–  Middleware: serveurs d'applica$ons, bases de données, .NET
–  Applica$ons: ISV ou auto-développé

• Pay per use: no capital investment necessary


• Scalability: dynamically adapt the resources to your needs
• Profit from economy of scale
• Enable environmental sustainability
– Backing data centers can be op$mized for efficient u$liza$on
–… can be built at appropriate places (green energy)

I.ELLOUMI-- I3C -- novembre 16, 2020 7


Service Models

Own IT IaaS Cloud PaaS Cloud SaaS Cloud



Amazon WS Microsog Azure
SeverPath Salesforce.com
Google App Engine
appNexus
Google Apps
Eucalyptus Microsog 365

Data Data Data Data
Applica$on Logic Applica$on Logic Applica$on Logic
Appl.Logic
Devel./Run$me Devel./Run$me Devel./Run$me Devel./Run$me

Infrastructure Infrastructure Infrastructure Infrastructure

I.ELLOUMI-- I3C -- novembre 16, 2020 8


Infrastructure as a Service (IaaS)
Offers
• Servers, storage, networking

Technologies
• Commodity hardware
• Virtualiza$on of servers, storage and networks
•Automated management of the infrastructure enabling self-
service of costumers
– dynamic provisioning of physical resources
– management of virtual resources
– op$miza$on of u$liza$on, power efficiency
– high reliability and guaranteeing SLAs
Example
Amazon EC2, Microsog Azure, Scaleway, Oracle, Outscale et OVH.


I.ELLOUMI-- I3C -- novembre 16, 2020 9
Plaeorm as a Service (PaaS)
Offers

• Packaged IT capability including logical resources and
software development support

Technologies
• Software development tools
– Online development tools
– Integration of local development tools with Cloud services

• Large-scale distributed application operating environment
– Enables usage beyond the limitations of a single physical hardware
– Scalable application middleware such as databases and file
systems
Example
• MS Azure https://azure.microsoft.com/en-us/overview/
• OpenShift (Red Hat)
10
I.ELLOUMI-- I3C -- novembre 16, 2020
Sogware as a Service (SaaS)
Offers
• Consumer or industrial applications to individual or
enterprise users.

Technologies
• AJAX
• Mashup
• SOA
• Multi-tenancy

Example
Salesforce https://www.salesforce.com/fr/?ir=1
Google G Suite,Microsog Office 365, JIRA Service Desk, Service
Now,Drooms, Adobe Crea$ve Cloud,Concur, Slack,
I.ELLOUMI-- I3C -- novembre 16, 2020 11
Deployment Models
• Public Cloud
via Web applications or services
IT resources are provisioned over the Internet
from an off-site third-party provider.

• Community Cloud
Shared by a group of organizations

• Private Cloud
IT services are offered via private networks for the exclusive use of one client,
providing full control over data, security, and quality of service, e.g., built and
managed by a company's own IT organization:

• Virtual Private Cloud
Resources appear to be operated for a single organization from a logical point
of view, but may be built from physical resources of the organization, external
providers, or both.

• Hybrid Cloud

I.ELLOUMI-- I3C -- novembre 16, 2020 12
Service Models

Software as a Service (SaaS).
The capability provided to the consumer is to use the provider’s
applications running on a cloud infrastructure. The applications are
accessible from various client devices through either a thin client
interface, such as a web browser (e.g., web-based email), or a program
interface. The consumer does not manage or control the underlying
cloud infrastructure including network, servers, operating systems,
storage, or even individual application capabilities, with the possible
exception of limited user-specific application configuration settings.

I3C - I.ELLOUMI - A.U 19/20 13


Service Models

Platform as a Service (PaaS).
The capability provided to the consumer is to deploy onto the cloud
infrastructure consumer-created or acquired applications created
using programming languages, libraries, services, and tools
supported by the provider. The consumer does not manage or control
the underlying cloud infrastructure including network, servers,
operating systems, or storage, but has control over the deployed
applications and possibly configuration settings for the application-
hosting environment.

I3C - I.ELLOUMI - A.U 19/20 14


Service Models
Infrastructure as a Service (IaaS).
The capability provided to the consumer is to provision processing,
storage, networks, and other fundamental computing resources where
the consumer is able to deploy and run arbitrary software, which can
include operating systems and applications. The consumer does not
manage or control the underlying cloud infrastructure but has control
over operating systems, storage, and deployed applications; and
possibly limited control of select networking components (e.g., host
firewalls).

I3C - I.ELLOUMI - A.U 19/20 15


Cloud Technologies

I.ELLOUMI-- I3C -- novembre 16, 2020 16


Cloud Technologies

I.ELLOUMI-- I3C -- novembre 16, 2020 17


Cloud vs Internal IT and Outsourcing

Internal IT Outsourcing
Capital Investment Significant Moderate setup free
Ongoing costs Moderate Significant
Provisioning time Significant Moderate
Flexibility Limited Moderate
Staff experience
Significant Limited
requirements
Reliability Varies High
Privacy High Moderate
Security Moderate High
Lock-in Low Moderate

I.ELLOUMI-- I3C -- novembre 16, 2020 18


Data Centers

I.ELLOUMI-- I3C -- novembre 16, 2020 19


Cloud is talked everywhere!!!

The cloud market will rise to more
than $241 billion in 2020 with a
year-to- year growth of over 20
percent.
- Forrester report

20
I.ELLOUMI-- I3C -- novembre 16, 2020
Cloud as a Response to Business
Needs

Cloud Compu/ng, Sandeep Bhowmik


I.ELLOUMI-- I3C -- novembre 16, 2020 21
Edge Compu$ng

I.ELLOUMI-- I3C -- novembre 16, 2020 22


Emergence du Edge Compu$ng (1)

Défis non résolus dans le cloud compu$ng:

•  End-to-End delay

•  Traffic conges$on

•  Processing of massive amount of data

•  Communica$on cost

•  Issue of Carbon footprint

•  Centralized data center

I.ELLOUMI-- I3C -- novembre 16, 2020 23


Emergence du Edge Compu$ng (2)

I.ELLOUMI-- I3C -- novembre 16, 2020 24


IoT Explosion

I.ELLOUMI-- I3C -- novembre 16, 2020 25


IoT + Cloud Compu$ng = Nouvelles
exigences
Traiter un volume, une variété et une vitesse de données sans précédent générés
par l’IoT.

I.ELLOUMI-- I3C -- novembre 16, 2020 26


Fog Compu$ng

27
Fog Compu$ng

“a system-level horizontal
architecture that distributes
resources and services of
compu$ng, storage, control
and networking anywhere
along the con$num from
cloud to Things.”
OpenFog Consor,um

I.ELLOUMI-- I3C -- novembre 16, 2020 28


Fog Compu$ng

I.ELLOUMI-- I3C -- novembre 16, 2020 29


Openfog Reference Architecture of
Fog Node

I.ELLOUMI-- I3C -- novembre 16, 2020 30


Applica$ons of Fog Compu$ng
• 
Ver/cal: Smart Robo$cs

Robots Simultaneous Localiza/on And Mapping (SLAM)

•  Subsurface Imaging for Oil & Gas Explora/on


Ver/cal: Energy
•  Smart Buildings
Ver/cal: Smart Spaces
•  Autonomous Driving
Ver/cal: Smart Transporta$on
• Pa/ent Monitoring
Ver/cal: Smart Healthcare
• Process Manufacturing – Beverage Industry
Ver/cal: Smart Factories
•  Live Video Broadcas/ng – Spor/ng Event
Ver/cal: Entertainment
• AerialDrones
Ver/cal: Supply Chain Delivery

I.ELLOUMI-- I3C -- novembre 16, 2020 31


Mobile Edge Compu$ng (MEC)

32
Mobile Edge Compu$ng (MEC)
Architecture

I.ELLOUMI-- I3C -- novembre 16, 2020 33


MEC node architecture

I.ELLOUMI-- I3C -- novembre 16, 2020 34


MEC applica$ons: Augmented Reality

I.ELLOUMI-- I3C -- novembre 16, 2020 35


Intelligent Video Accelera$on

36
I.ELLOUMI-- I3C -- novembre 16, 2020
Connected Vehicle

I.ELLOUMI-- I3C -- novembre 16, 2020 37


Tac$le Internet

I.ELLOUMI-- I3C -- novembre 16, 2020 38


Avantage du Edge Compu$ng

Reduced latency

Bandwidth reduc$on

High energy efficiency

Proximity services

U$liza$on of context informa$on

I.ELLOUMI-- I3C -- novembre 16, 2020 39
Research Trends in Fog/Edge
Compu$ng in terms of QoS
•  Latency
Selec$on of fog nodes: with compu$ng and communica$on latency constraint
It is true that both compu$ng and communica$on latency change according to
the service request from EUs and available resources in a fog layer.

•  Random Policy: In this policy, a fog node is randomly and uniformly selected
without considering any other factors.

•  Lowest Latency Policy: A fog node that provides minimum total latency at the
current state of the system is selected for the given workload.

•  Maximum Available Capacity Policy: This policy selects a fog node which has
maximum remaining resource.

I.ELLOUMI-- I3C -- novembre 16, 2020 40


Research Trends in Fog/Edge
Compu$ng in terms of QoS
•  Caching
Where to cache ?
Core network
Radio access network
User device

What to cache ?
Content popularity

How to cache ?
Conven$onal caching
User preference caching
Learning based caching
Non-coopera$ve caching
Coopera$ve caching


I.ELLOUMI-- I3C -- novembre 16, 2020 41
Resource Sharing Criteria

•  Computa$onal offloading: which task to be offloaded is
the big ques$on.
•  Energy consump$on
•  Latency
•  Bandwidth usage

•  Energy consump$on: A tradeoff between power


consump$on and transmission delay
Selec$on of energy efficient applica$on

I.ELLOUMI-- I3C -- novembre 16, 2020 42


Load Balancing

•  The terminal nodes in fog compu$ng change
their states such as ac$ve or inac$ve, joining
or leaving any fog compu$ng instances more
frequently compared to the tradi$onal cloud
compu$ng.

Besoin d'équilibrage de charge dynamique

I.ELLOUMI-- I3C -- novembre 16, 2020 43


5G as a key enabler of Fog/Edge/Cloud
5G Usage Scenarios

I.ELLOUMI-- I3C -- novembre 16, 2020 44


5G Architecture

I.ELLOUMI-- I3C -- novembre 16, 2020 45


5G Cloud Na$ve Core Network

Le cloud na$f est une approche pour créer et
exécuter des applica$ons qui exploitent
pleinement les avantages du modèle de cloud
compu$ng.
–  Microservices
–  Containers
–  Con$nuous Delivery
–  DevOps

I.ELLOUMI-- I3C -- novembre 16, 2020 46


Cisco Solu$ons

I.ELLOUMI-- I3C -- novembre 16, 2020 47


Networks
Routers connecting computers or LAN of computers
• Routing algorithm: oblivious and adaptive routing
Metrics
• Bandwidth = bytes / second
• Latency = time for message transfer
• Aggregated bandwidth

Networks: different worlds

Wide Area (Core, Backbone) Networks:
• homogeneous (opto - electronic) base technology, immense potential
• dramatic economy of scale (bandwidth, not connectivity!)
Local Area and Cluster Networks:
• (non - shared) Ethernet (0.1/1/10 Gbps)
• Infiniband and others (in clusters)
Last Mile (for Cloud access)
• heterogeneous base technologies: Radio, Digital Subscriber Lines, TV Cable,
Fibre
• Technical and financial challenges
48
• Cost changed dramatically in the last years
I.ELLOUMI-- I3C -- novembre 16, 2020
Network transport $me
The

transport time for a message consists of 4
parts:
• physical delay: large percentage of speed of light,
approx. 5 ms/1000 km
• protocol delay: complexity increases (reliability,
security, management), compensated by increasing
CPU performance
• line waiting time: negligible up to 10% utilization (as
in WANs)
• transmission time= message size/bandwidth:

only the last two parts are reduced by the


bandwidth growth!

I.ELLOUMI-- I3C -- novembre 16, 2020 49
Infiniband

Low latency, high bandwidth connections
Used in clusters and servers
Speed
• EDR (Enhanced Data Rate) 2014
• 25 Gbit/s
• 4 links 100 Gbit/s, 12 links 300 Gbit/s
• Adapter latency 0.5 usec
• Copper (up to 10m) and fiber (up to 10 km)
Provides RDMA access
Based on Virtual Interface Adapter (VIA)
• Data transfer do not require operating system support.
Mellanox, Intel, Oracle main providers

I.ELLOUMI-- I3C -- novembre 16, 2020 50
Sogware Defined Networks:
A few words about tradi$onal networks

I.ELLOUMI-- I3C -- novembre 16, 2020 51


Recent Requirements
Business speed.
Network configurations should be automated.
• Manual errors
• Configuration time should be reduced in a programmatic
way.
Security reasons
• Agile security policies
Performance variations
• Varying bandwidth requirements.
• Varying QoS policies.
Agility in application developments.
• Applications require different topologies..
Open networking.. And standards..
• Non-proprietary way of doing things.
52

I.ELLOUMI-- I3C -- novembre 16, 2020
SDN – Sogware Defined Networking
Idea, Evolu$on, and architecture...
plane.
• Idea is to separate control and data
• History is that Networking companies such as Big Switch networks,
Cisco, Citrix, Arista networks, NEC, HP, IBM, VMWare, and so forth
joined together to develop such open solution (the development of SDN
controller) via. OneDayLight project in 2013.

53
I.ELLOUMI-- I3C -- novembre 16, 2020
OpenFlow
Protocol
• It is widely used by SDN controllers.
• OpenFlow is not a SDN. But, it is a protocol that is utilized in the SDN
framework.
• It is designed by ONF (Open Networking Foundation).
Goals
• to interact with networking devices of any proprietary kind (to enable
an open interface to SDN).
• OpenFlow is layered on top of L3.
• SDN controllers communicate to L3 switches using OpenFlow
protocols by listening on TCP port 6653

• Examples of SDN controllers:


– Application Policy Infrastructure Controller (APIC) from Cisco
– Programmable Flow from NEC
– NSX controller from VMWare
I.ELLOUMI-- I3C -- novembre 16, 2020
54
SDN for Fog/Edge Compu$ng in 5G

I.ELLOUMI-- I3C -- novembre 16, 2020 55


NFV for Fog/Edge Compu$ng in 5G

I.ELLOUMI-- I3C -- novembre 16, 2020 56


Network Slicing for Fog/Edge
Compu$ng in 5G

I.ELLOUMI-- I3C -- novembre 16, 2020 57


mmWave Communica$on
• Huge bandwidth

•  millimeter wave (mmWave) band from 30 GHz to 300 GHz
•  Providing mul$ -gigabit communica$on services

I.ELLOUMI-- I3C -- novembre 16, 2020 58


D2D Communica$on

59
I.ELLOUMI-- I3C -- novembre 16, 2020
Open Issues and Challenges

•  Heterogeneity
•  Enabling Real-$me analy$cs
•  User mobility
•  Pricing policy
•  Scalability
•  Security
•  Privacy
•  User par$cipa$on

I.ELLOUMI-- I3C -- novembre 16, 2020 60


Open Issues and Challenges

Process technology
Compute
• CPU
• GPU
• FPGAs (Field Programmable Gate Arrays)
• Memory
• Shared memory systems
• Distributed memory systems
Networks

I.ELLOUMI-- I3C -- novembre 16, 2020 61

Cloud Infrastructures

IaaS, PaaS, SaaS


Pricing Models
Quality of Service

I.ELLOUMI-- I3C -- novembre 16, 2020 62


Infrastructures

①  Amazon Web Services

②  MS Azure

③ OpenStack (Part A-B-C)


I.ELLOUMI-- I3C -- novembre 16, 2020 63


I. Amazon Web Services

Elas$c Compute Cloud (Amazon EC2)


Simple Storage Service (Amazon S3)


Simple Queue Service (Amazon SQS)


CloudFront

SimpleDB

h_p://aws.amazon.com

I.ELLOUMI-- I3C -- novembre 16, 2020 64
AWS

65
I.ELLOUMI-- I3C -- novembre 16, 2020
AWS
Amazon EC2 provides


•  Virtual machines running inside the Amazon Cloud.

•  Ephemeral storage $ed to the virtual machine (node)

•  Block storage that acts like a SAN and persists across $me
and can be mounted in the VM.

•  Virtual firewall to secure your network in the Cloud



•  Based on Xen hypervisor
I.ELLOUMI-- I3C -- novembre 16, 2020 66
AWS - Regions
• Geographic cluster of availability zones

• Currently 16 regions

Account has one or more available regions


– AWS GovCloud (US) limited to: AWS GovCloud (US) region
– AWS (China) accounts only: AWS (China) Bejing

User can control where resources are allocated


– Meet legal requirements such as in Europe
– Have short latency access for customers

• Regions are isolated for fault tolerance and
stability.
You see only your VMs in the current region.
Communication among regions is not free. 67
I.ELLOUMI-- I3C -- novembre 16, 2020
AWS – Availability Zones
a data center
Availability Zone: Think about
Two availability zones have no common points of failure, thus
servers in two zones gain infrastructural redundancy
Naming
– region code + letter, us-east-1a
– Mapping of names to zones might be different for different accounts
for load balancing.
User can control the zone in which a VM is started for fault
tolerance reasons, otherwise AWS will select a zone.
Number of zones in a region might be different for accounts.

Amazon‘s SLA guarantees 99,95% region availability.


Region unavailable, if more than one of your zones in a region
is not available to you.
I.ELLOUMI-- I3C -- novembre 16, 2020 68
Amazon Elas$c Compute Cloud

Provides
•  Virtual machines running inside the Amazon Cloud.
•  Ephemeral storage tied to the virtual machine (node)
•  Block storage that acts like a SAN and persists across
time and can be mounted in the VM.
•  Virtual firewall to secure your network in the Cloud
Based on Xen hypervisor

AWS announced end of 2017 to switch to an own


hypervisor based on KVM for new highend Intel
processors.

I.ELLOUMI-- I3C -- novembre 16, 2020 69


Amazon Machine Image

Amazon Machine Image (AMI)
• Copy of a server with OS and preinstalled software
• Predefined AMIs from Amazon and third-parties,
user-defined AMIs possible
• AMIs are stored in S3
• Difficult to select an AMI, they could even include
Trojans or backdoors.
• Amazon provides reviews and ratings

http://aws.amazon.com/amis

I.ELLOUMI-- I3C -- novembre 16, 2020 70


Amazon Marketplace
Link to Marketplace
h_ps://aws.amazon.com/marketplace/search/results?
page=1&filters=pricing_plan_a_ributes&pricing_plan_a_ributes=FREE

I.ELLOUMI-- I3C -- novembre 16, 2020 71


Amazon EC2 Instance
Instance
on an AMI
•  Running VM which is based
Instance type
•  VM with different compute and memory capabilities.
Storage (ephemeral storage)
•  Boot device volume: e.g., Elastic Block Storage
•  Instance store volumes: mapped to block storage and
mounted in VM
•  Both types are lost when VM is terminated.
Elastic IP address
•  Static IP address, required if you want to use an instance
that must always be accessible by the same static IP
address
•  You pay for address independent of the usage.
Account limit of number of VMs of a certain type 72

I.ELLOUMI-- I3C -- novembre 16, 2020
AWS instance lifecycle

I.ELLOUMI-- I3C -- novembre 16, 2020 73


AWS Storage

• Amazon Elastic Block Storage


• Amazon EC2 Instance Storage
• Amazon Elastic File System (Amazon EFS)
• Amazon Simple Storage Service (Amazon S3)
74
I.ELLOUMI-- I3C -- novembre 16, 2020
Amazon Block Storage

Block storage volume

•  Block-level storage which can be mounted


•  It can be formatted as appropriate
•  Multiple can be combined into a virtual
RAID
•  Snapshots of block storage volume are
stored in S3 for backup or replication

I.ELLOUMI-- I3C -- novembre 16, 2020 75


Amazon Instance Storage
host
• Disks attached to the physical
• If you stop or terminate an instance, any data on instance
store volumes is lost.
• Some instance types use NVMe or SATA-based solid state
drives (SSD) to deliver high random I/O performance.

Amazon Elastic File System

• Scalable file storage
• Can be created and mounted into instances.
• Files can be shared among instances.
• File system has to be explicitely created and destroyed.

I.ELLOUMI-- I3C -- novembre 16, 2020 76
Amazon Simple Storage Services (S3)
storage infrastructure
Reliable and inexpensive data
•  Supports objects from 1 bytes to 5 TB
•  Two-level namespace
– Buckets: flat collection of buckets, namespace is shared across all Amazon
customers
– Objects: File in the buckets
•  Slow compared to local discs or SAN

Access
•  In EC2
•  From the web

High durability but low availability

Most users use S3 for short-term or long-term backup


I.ELLOUMI-- I3C -- novembre 16, 2020 77
Comparison of EC2 data storage
op$ons
Amazon S3
Instance Block storage
high but
Speed Low High
unpredictable
Availability Medium High High
Durability Super high Super low High
Flexibility low Medium High
Cost Medium Low High
Strength Backup data Transient data Operational data
Weakness Operational data Nontransient data Lots of small I/O

I.ELLOUMI-- I3C -- novembre 16, 2020 78


Amazon Public Data Sets

Public data sets from the following categories
Biology Includes Human Genome Project, GenBank, and other
content.
Chemistry Includes multiple versions of PubChem and other content.
Economics Includes census data, labor statistics, transportation
statistics, and other content.
Encyclopedic Includes Wikipedia content from multiple sources and
other content.

Available for free to Amazone instances

I.ELLOUMI-- I3C -- novembre 16, 2020 79


Amazon Simple Queue Service (SQS)

Messaging system
•  Accepting messages and passing them on to servers
subscribing to the message queue.
•  Server need not identify a recipient
•  Recipient does not even need to be active at the time
the message is sent.
Messages of any size
Messages can be encrypted
•  AWS Key Management Service (KMS) stores also
those keys.
•  AWS CloudTrail records the use of the keys for
encryption to proof your regulations and compliance
requirements.

I.ELLOUMI-- I3C -- novembre 16, 2020 80
Amazon CloudFront

Cloud-based content distribution network
•  Allows you to place your online content on a global network
of edge locations
Content will be delivered from a location close to the requestor.
To use Amazon CloudFront, you:
1.  Store the original versions of your files in an Amazon S3
bucket.
2.  Create a distribution to register that bucket with Amazon
CloudFront through a simple API call.
3.  Use your distribution’s domain name in your web pages
or application.
4.  Pay only for the data transfer and requests that you
actually use.
Protection from DDoS attacks by AWS Shield

I.ELLOUMI-- I3C -- novembre 16, 2020 81
AWS databases
Amazon DynamoDB

• Highly scalable NoSQL database
•  Throughput and storage scaling
•  3-way replication
Amazon RDS
•  Relational Database Service
•  Suports MySQL, Oracle, SQL Server, or PostgreSQL
•  It provides cost-efficient and resizable capacity while
managing time-consuming database administration
tasks.

I.ELLOUMI-- I3C -- novembre 16, 2020 82


AWS databases

• Amazon Redshift
Provides a data warehouse service.
Scalable and pay per use
Redshift video : https://aws.amazon.com/fr/free/databases-free-tier/?nc1=h_ls`

• Amazon Elastic Cache
• Web service to operate an in-memory cache, Redis and
Memcached

I.ELLOUMI-- I3C -- novembre 16, 2020 83


Amazon SimpleDB
Highly available NoSQL database
Simple web services interface
•  to create and store multiple data sets, query your data easily, and
return the results.

Your data is automatically indexed


•  making it easy to quickly find the information that you need.

There is no need to pre-define a schema or change a


schema if new data is added later.

Does not provide transaction management etc.

Highly replicated and geographically distributed copies.


I.ELLOUMI-- I3C -- novembre 16, 2020 84
EC2 access
Primary means is through a web services API

Interactive tools on top of the API


• Amazon Web Services Console
• ElasticFox Firefox plug-in
• Amazon Command Line tools

Third-party infrastructure tools


• Management of a whole infrastructure with multiple
servers, accounts, reports etc.
• RightScale: https://www.rightscale.com

Access to your server is by private/public key pair



I.ELLOUMI-- I3C -- novembre 16, 2020 85
Instance Types 2017

h_ps://aws.amazon.com/fr/ec2/pricing/on-
demand/?nc1=h_ls
Standard Instances
RAM DISC
vCPU Price $/h
(GB) (GB)
t2.small 1 2 EBS only 0,0268
t2.large 2 8 EBS only 0,1071
t2.xlarge 4 16 EBS only 0,2144

High-CPU Instances
CPU
vCPU (EC2
RAM DISC
Price $
(GB) (GB)
CU)
EBS
c4.large 2 8 3,75 0,114
only
c4.8xlar EBS
I.ELLOUMI-- I3C -- novembre 16, 2020 36 132 60 86
1,817
ge only
Pricing for Data Transfer
Internet
IN: $0.01 per GB
OUT: < $0.09 per GB
Inside Availability Zone (private IP address)
None
Regional Transfer (private IP address)
Between different availability zones in same region
$0.01 per GB in/out
Public and Elastic IP address inside EC2
$0.01 per GB in/out

I.ELLOUMI-- I3C -- novembre 16, 2020 87


Pricing Block Storage and Elas$c IP Addresses


Block Storage
• $0.119 per GB-month of provisioned storage on SSD
• $0.054 per GB-month of provisioned storage on HDD
• $0.078 per provisioned IOPS-month (some SSD storage)
Snapshots to S3
• $0.045 per GB-month of data stored
• $0.012 per 1,000 PUT requests (when saving a snapshot)
• $0.012 per 10,000 GET requests (when loading a snapshot)
Elastic IP Addresses
• No cost for Elastic IP addresses while in use
• $0.005 per non-attached Elastic IP address per complete hour
• $0.00 per Elastic IP address remap – first 100 remaps/month
• $0.10 per Elastic IP address remap – addition remap/month over 100

I.ELLOUMI-- I3C -- novembre 16, 2020 88


Amazon EC2

• Infrastructure as a service
• Offers also plaeorm as a service
Lambda (h_ps://aws.amazon.com/fr/lambda/ ),
keƒa(h_ps://aws.amazon.com/fr/kaƒa/ ), …

• Flexible instance types


• Large variety of Amazon Machine Instances
• Pricing: On-Demand, reserved, spot market
pricing
• Cloud Watch
• Auto-scaling

I.ELLOUMI-- I3C -- novembre 16, 2020 89
Function-as-a-Service

Way of Serverless Computing

Serverless
• No need to provision servers.
• User just provides the application logic in form of
functions that are triggered on-demand.
– Different from PaaS model where at least one instance of a
microservice always runs.
– Microservice handles multiple requests.
• When triggered, the function and its runtime is
started-up.
• When infrequently used, the function is spinned-
down. I.ELLOUMI-- I3C -- novembre 16, 2020 90
AWS

91
I.ELLOUMI-- I3C -- novembre 16, 2020
Serverless Compu$ng
Advantages
• No provisioning of servers
• Automatic scaling
• Reduction of costs. Do not pay for idle VMs.
• Underlying servers shared among different function
invocations.

Disadvantages
• Focused on stateless functions
• Performance variation due to restart latencies
• Not suited for heavy computation workloads, own VMs
might be cheaper.
• Limited security: shared VMs, no control over the network

I.ELLOUMI-- I3C -- novembre 16, 2020 92
Amazon Lambda

2014: first serverless offering by a public cloud
provider

Designed for use cases such as


• image or object uploads to Amazon S3,
• updates to DynamoDB tables,
• responding to website clicks or
• reacting to sensor readings from an IoT connected device.
• Backend implementation for custom http requests

Metering
• Increments of 100 ms

I.ELLOUMI-- I3C -- novembre 16, 2020 93
Lambda func$ons

Anonymous functions in functional programming
• Not bound to an identifier
• Often used as arguments being passed to higher-
order functions or constructed as a result of a higher-
order function
• E.g. heavily used in node.js applications

I.ELLOUMI-- I3C -- novembre 16, 2020 94


AWS Lambda

I.ELLOUMI-- I3C -- novembre 16, 2020 95


Amazon Lambda

I.ELLOUMI-- I3C -- novembre 16, 2020 96


AWS Lambda

I.ELLOUMI-- I3C -- novembre 16, 2020 97


Microsoft Azure

1.  Azure provides IaaS and PaaS
2.  Web app and Service Fabric simplify
deployment of applica$ons into the
cloud.
3.  Special support for integra$ng on-
premise and cloud resources

I.ELLOUMI-- I3C -- novembre 16, 2020 98


Microsoft Azure

Cloud service started 2010
Offers a wide variety of services
• Infastructure-as-a-Service
– Azure Virtual Machines and Azure Virtual Network
• Platform-as-a-Service
– Azure Web Apps
– Azure Cloud Services
– Azure Service Fabric
• Hosted storage and data access
– Azure Cosmos DB: non-SQL
– Azure Storage: Blobs, queues, files, tables
– Azure SQL Database
• Management services
I.ELLOUMI-- I3C -- novembre 16, 2020 99
Cloud Revenues
Public

Cloud Revenue Market Share 2017
(Gartner)
• 47 % Amazon Web Services
• 10 % Microsoft Azure
• 2.7 % IBM Softlayer (now IBM Cloud)
• 3.9 % Google Cloud Platform
Revenues 2017
• SaaS: 46.33 B$
• IaaS: 34.60 B$
• PaaS: 8.85 B$

I.ELLOUMI-- I3C -- novembre 16, 2020 100
Azure access
Interfaces
• Azure portal
– Web interface to manage resources, data, and applications

• Command-line interface

• REST APIs

• Platform
– specific SDKs
– .NET, Node.js, Java, PHP, Python, Ruby

I.ELLOUMI-- I3C -- novembre 16, 2020 101
Access to Azure
Account
• It is simply an identity. Either in a trusted organization or your
Microsoft account.
Subscription
• Is a logical unit of Azure services. Each associated account has
a role in a subscription. Billing is done on a subscription basis.
-  Free trial
-  Basic ...
• Account Administrator can control the subscription and billing

• Service Administrator controls all services in the subscription.

• Resource groups always associated with a given subscription.


- E.g. All resources for an application build a group and are associated
with the free subscription.
- Maximum amount of resources and resource types are limited by your
subscription. I.ELLOUMI-- I3C -- novembre 16, 2020
102
Azure Virtual Machines Service (IaaS)
Virtual Machines
• Linux and Windows-based VMs

Azure Virtual Network


• Connects VMs and services in the cloud
• Can connect cloud resource through Internet with on-
premises resources via VPN
• Cloud resources appear to be on your own network.

Azure ExpressRoute
• Connects cloud resources via dedicated lines.

I.ELLOUMI-- I3C -- novembre 16, 2020 103


Azure Virtual Machines Service
Traffic Manager

• It uses DNS to route users to service endpoints, e.g. for
latency or resilience.
• It only sets up the route.

I.ELLOUMI-- I3C -- novembre 16, 2020 104


Resource Manager

Azure Resource Manager
• Resources of an application are managed as a group.
Monitoring and other management actions work on the group of
resources.
• Create a template defining all resources as well as
dependencies.
• When deploying a template, all resources are created
accordingly.

105
I3C - I.ELLOUMI - A.U 19/20
Azure Web Apps Service (PaaS)
Platform to run web
applications without need to
manage VMs
• Apps can be deployed into a
managed web environment.

• Application can be scaled out and in


with automatic load balancing.

• Apps can share VMs or run in its


own VM.

• App development in .NET,PHP,


Node.js, Java, Python
I.ELLOUMI-- I3C -- novembre 16, 2020 106
App Development

Application can be written in different languages.

Ex. node.js application

Local Steps
1. Create a git repository
2. Develop your application locally

Azure Steps
3. Create a deployment user
az webapp deployment user set --user-name <username> --
password <password>
4. Create a resource group
az group create --name myResourceGroup --location "West
Europe"

I.ELLOUMI-- I3C -- novembre 16, 2020 107
App Development
• Azure
5. Create an app service plan determining instance type
(linux or windows), scale count, and subscription
az appservice plan create --name myAppServicePlan --resource-
group myResourceGroup –-number-of- workers 1 --sku FREE

6. Create a web app


az webapp create --name <app_name> --resource- group
myResourceGroup --plan myAppServicePlan --deployment-
local-git
– Receive the git URL

7. Push to Azure from Git via remote repository
git remote add azure <deploymentLocalGitUrl-from- create-step>
– Authentification via deployment user credentials
git push azure master

I.ELLOUMI-- I3C -- novembre 16, 2020 108
App Development
8. Browse to app
http://<app_name>.azurewebsites.net

I.ELLOUMI-- I3C -- novembre 16, 2020 109


App Management

I.ELLOUMI-- I3C -- novembre 16, 2020 110


App Service plan overview
Plan defines

• Region
• Resources and resource type in a region are added to App
Service plan.
– Multiple apps can be put into the plan and will run on those resources
• Subscription
– Shared compute: Free or Shared; VMs are shared among customers;
hourly charge shared among customers
– Dedicated compute: Basic, Standard ... Premium V2; only apps of the
same plan share VMs; Hourly charge for VMs
– Isolated: Dedicated VMs and Dedicated Virtual Network; hourly charge
for VMs and for each App Service Environment (Separated network).

Share a plan to share resources



I.ELLOUMI-- I3C -- novembre 16, 2020 111
App Scaling
App Service Plan
Scaling is applied to the
• Apps will be scaled together
Adjust the number of instances
• Manually or
• Automatically
– Select metric and target range plus lower and upper
bounds for the number of instances.

– Rules can be applied only on certain days or time periods


112

I.ELLOUMI-- I3C -- novembre 16, 2020
Quotas

Quotas are limits defined by the subscription

• Free and Shared


– 5 minute CPU usage
– 24 h CPU usage
– Total memory consumption
– 24 h bandwidth usage
– Total file system usage

• Other subscriptions
– File system only

I.ELLOUMI-- I3C -- novembre 16, 2020 113


App Monitoring
Metrics per application
•  Average Response Time, Average memory working
set, CPU Time, Data In, Data Out, Requests, ...
Metrics per App Service Plan
•  CPU Percentage: average across all instances
•  Memory Percentage
• Data In, Data Out
• Disk Queue Length, Http Queue Length
Granularity and Retention
•  Minute granularity metrics for 48 hours
•  Hour granularity metrics for 30 days
• Day granularity metrics for 90 days
Metrics can be inspected and alerts defined in the
Azure portal I.ELLOUMI-- I3C -- novembre 16, 2020 114
Cloud Services

Platform supporting highly
scalable apps
• Code runs on multiple VMs
• VM are managed by the
platform
• VMs run Windows Server
• VMs are of two type
– Worker role
– Web role running IIS
• S c a l e i n a n d o u t o f
instances of either role.
This service is replaced by
Service Fabric

I.ELLOUMI-- I3C -- novembre 16, 2020 115
Microservices with Service Fabric

Fine-grained service-oriented architecture (SOA)

I.ELLOUMI-- I3C -- novembre 16, 2020 116


State storage

I.ELLOUMI-- I3C -- novembre 16, 2020 117


Monolithic vs Microservice
Architecture
Monolithic
• Tiered architectures

• Interfaces between tiers; in a tier tightly coupled via libraries
• Difficult to have an agile development process
• Clear testing and deployment process

Microservice
• Each encapsulates simpler business functionality.
• Testing, deployment, scaling individually for each service
• Different technologies to be used for the services
• More complex deployment and versioning of entire
application
• Increased network traffic and latency sensitivity

I.ELLOUMI-- I3C -- novembre 16, 2020 118

Microservice defini$ons

Characteristics of microservices
• Encapsulate a single customer or business scenario.
• Developed by a small engineering team.
• Written in any language or framework.
• Consist of code and (optionally) state.
• Independently versioned, deployed, and scaled.
• Interact over well-defined interfaces and protocols.
• Have unique names (URLs) used to resolve their
location.
• Remain consistent and available in the presence of
failures.
• Reports health and diagnostics

I3C - I.ELLOUMI - A.U 19/20 119
Azure Service Fabric
Platform for microservice based applications
• Platform services: Deploy, upgrade, detect, restart,
route messages, manage state, monitor health.
• Application services as processes or containers or C#
objects
• Standard programming APIs integrated with the
platform, e.g. health and diagnostics and built-in high
availability.
Migrating to Service Fabric

1)Take a traditional monolithic application


2) Lift and Shift - Use containers or guest executables to host existing code in Service Fabric.
3) Modernization - New microservices added alongside existing containerized code.
4) Innovate - Break the monolithic into microservices purely based on need.
5) Transformed into microservices I.ELLOUMI-- I3C -- novembre 16, 2020 120

Fabric Cluster

Set of virtual or real machines (nodes) even from different
regions into which the services will be deployed.
•  Nodes can have key value pairs identifying properties
•  Services might have placement constraints that are
automatically enforced when the service is started.
- Constraints can change dynamically based on
application metrics, e.g., disk requirements
Azure provides load balancer
•  Distributing services to the nodes, including migration.
•  Distributing requests to the services.
Scaling of fabric cluster as in app scaling
•  Applications are automatically balanced on service level.

I.ELLOUMI-- I3C -- novembre 16, 2020 121
Service Deployments

I.ELLOUMI-- I3C -- novembre 16, 2020 122


Fabric Cluster with 5 Nodes

I.ELLOUMI-- I3C -- novembre 16, 2020 123


Service Fabric‘s Infrastructure Services

I.ELLOUMI-- I3C -- novembre 16, 2020 124


Service Fabric Applica$ons

Consist of
• Application types
• Service types

Application and service are instances of a type

Each type has a manifest.xml file specifying its


name and version

These types are uploaded to the image store

Services are then created from the image store


I.ELLOUMI-- I3C -- novembre 16, 2020 125

Par$$oning of State and Replica$on

Stateless services
– Any state might be stored in one of the storage services
Stateful Service
• State can be stored in reliable collections on the
nodes.
– Multi-node, replicated, persistence option, asynchronous,
transactional data structures
• State can be partitioned, e.g., for employees by
region.
• Partitions can be replicated, having multiple service
instances

I.ELLOUMI-- I3C -- novembre 16, 2020 126
Par$$oning of State and Replica$on

I.ELLOUMI-- I3C -- novembre 16, 2020 127


Health monitoring

Service Fabric provides health reporting.

Reporting can be done from


• The services themselves
• Fabric watchdogs service deployed on a node
• Application specific watchdogs on the nodes
• External watchdogs probing the resource from
outside the cluster

Reports can be visualized through the


Service Fabric Explorer

I.ELLOUMI-- I3C -- novembre 16, 2020 128
I.ELLOUMI-- I3C -- novembre 16, 2020 129
Testability

Support for fault injection

Actions
• Restart a node
• Restart a partition of instances or individual instances
• Move replica of stateful service to simulate load balancing,
failover, or application upgrade
• Invoke data loss in a stateful service

Scenarios of complex operations


• Chaos scenario: simulates continuous overlapping faults
• Failover scenario: like chaos but targeting a specific
service partition.

I.ELLOUMI-- I3C -- novembre 16, 2020 130
Azure Marketplace

Platform to offer and buy applications

and data

I.ELLOUMI-- I3C -- novembre 16, 2020 131


Pricing

Own Service Fabric Cluster
• Pay for your VMs, storage, networking, and IP Addresses

Service Fabric Mesh


• Managed cluster
• Payment for memory and compute capacity of started
containers.

I.ELLOUMI-- I3C -- novembre 16, 2020 132

You might also like