Promises of Cloud Computing to the Customer
-Scalability
-Elasticity
-Resource Decoupling
What is EC2 and what does it provide?
Amazon Elastic Compute Cloud
Provides scalable computing capacity in the cloud
What is an EC2 instance?
Virtual Computing Environment
(physical servers are sliced into smaller virtual machines: instances)
Data centers
centralized compute facilities
Racks
Allows squeezing many serves into a small space
FAT Tree Topology
Los enlaces superiores son mas anchos o mas rapidos para manejar mas trafico y evitar bottlenecks.
Leaf Spine Topology
Spine Switches
Switches de nivel superior
Leaf Switches
Switches conectados directamente a los servidores (como ToR switches en cada rack)
Hypervisors (xen, KVM)
-allow virtualizing hardware
-emulates a specific complete computer (x86, ENA, NVMe)
I/O Devices in a VM
-hypervisor provides virtual hardware devices for each VM/guest OS
How to split ressources?
-fair share: static split ressources
-competitive: dynamically split ressources depending on workloads
-token-bucket: temporary allow overcommiting but converge to fair share
Virtual Disk
AWS: EBS (elastic block store)
-Can be provisioned on demand
-Somewhat elastic pricing
-allows stopping a VM without losing the data
-also allows changing instance type: stop VM, start on other instance with same virtual disk
How Are Virtual Disk Implemented?
virtual disks are connected through the network
1.Network Attached Storage (NAS) reuses existing network
(es como tener una carpeta compartida en red donde varias VMs guardan datos)
VM vs container
Virtual machines:
-heavyweight (boot time, memory)
-better security
-better performance isolation
-allow changing OS
Containers:
-lightweight, isolated environments
-lower startup times
-better memory utilization
if you run a container in a public cloud, it will probably be within a VM
Unikernels
Simple single-address space operating systems (No hay múltiples procesos ni usuarios)
Ejemplos: unikraft, osv, nanos
TCO
TCO = data center depreciation + data center OPEX + server depreciation + server OPEX
very cheap machines do not necessarily have the lowest TCO due to other costs (cooling, energy)
ojo al kw/h
Caracteristicas AWS EC2
Doesn’t support live migration (no se puede mover una instancia a otro servidor fisica sin apagarla)
to change an instance (e.g., increase its size), it has to be stopped
to avoid service disruption: load balancer in front of compute nodes
Load balancer distruye el trafico entre varios servidores
Google Cloud and Azure support live migration
Region/AZ Choice: Considerations
legal reasons
availability
fault tolerance
Pricing Models
on demand: per second pricing
spot: variables costs, interruption possible
reserved: reservation for 1 or 3 year
SLAs
SLAs are a way to commit to quality standards for a service, e.g., availability, performance, durability
Burstable instances
Diseñados para trabajos que normalmente usan poca CPU, pero que a veces necesitan picos cortos de alto rendimiento
available burstable instance families: t4g (ARM), t3 (Intel), t3a (AMD), t2 (Intel)
AWS Lambda
-Function as a Service (Serverless)
-Automatic scaling
-intended for short invocations, not suitable for long-running services
-Solo pago por el tiempo que se ejecuta el codigo
-Maximum duration of 15 minutes
-No network communication with other Lambdas
-Implementation: KVM (Kernel Virtual machine) + special virtual machine monitor (Firecracker instead of QEMU hypervisor) son micro vms
Lambda vs EC2
Ventajas de Lambda (frente a EC2)
-Automatic elasticity and scalability, no server management/administration
-Low latency startup (arranca en milisegundos gracias a las micro vms)
-Fine-grained pricing (pagas por uso exacto)
-Available in very small sizes low cost for small jobs
Desventajas
-more than 2× higher cost for long-running jobs (Lambda runs on EC2)
little hardware customization (no se puede elegir CPU)
-limitations (duration, size, networking) (max 15 min de ejecucion)
AWS Fargate
(lambda pero para contenedores)
* container-based compute service alternative to EC2
-minimo tiempo de facturacion 1 min
Fargate vs EC2
Ventajas de Fargate (frente a EC2)
-no manual instance management
-finer CPU/RAM granularity than EC2
-CPU and RAM can be configured separately
Desventajas
-slightly more expensive than EC2
-requires ECS/EKS
-fewer hardware options (no se puede elegir GPU)