M.E.L.I.G. Unikernel and Serverless

42
VM -> SERVERLESS MEETUP 2017-03-23

Transcript of M.E.L.I.G. Unikernel and Serverless

Page 1: M.E.L.I.G. Unikernel and Serverless

VM -> SERVERLESSMEETUP 2017-03-23

Page 2: M.E.L.I.G. Unikernel and Serverless

OF IT-INFRASTRUCTURECOMMODITISATION

Page 3: M.E.L.I.G. Unikernel and Serverless

COMMODITISATION

SHORT HISTORY OF COMPUTE

1960

2000

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

3

Page 4: M.E.L.I.G. Unikernel and Serverless

COMMODITISATION

SHORT HISTORY OF COMPUTE

1960

2000

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

1996 First x86 commodity Linux cluster

4

Page 5: M.E.L.I.G. Unikernel and Serverless

COMMODITISATION

SHORT HISTORY OF COMPUTE

1960

2000

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

5

Page 6: M.E.L.I.G. Unikernel and Serverless

COMMODITISATION

SHORT HISTORY OF COMPUTE

physicalvirtual

1960

2000

today

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

5

Page 7: M.E.L.I.G. Unikernel and Serverless

COMMODITISATION

SHORT HISTORY OF COMPUTE

physicalvirtual

1960

2000

today

▸ VMware on blades

▸ Public Cloud

▸ Containers

▸ Serverless

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

5

Page 8: M.E.L.I.G. Unikernel and Serverless

TCO

COMMODITISATION

SHORT HISTORY OF COMPUTE

physicalvirtual

1960

2000

today

▸ VMware on blades

▸ Public Cloud

▸ Containers

▸ Serverless

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

5

Page 9: M.E.L.I.G. Unikernel and Serverless

COMMODITISATION

COMMODITY ITEMS (SOFTWARE EATS THE WORLD) *

physicalvirtual

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

▸ VMware on blades

▸ Public Cloud

▸ Containers

▸ Serverless

1960

2000

today

HW SW

HW SW

HW SW

HW SW

SW

SW

* rough estimate

6

Page 10: M.E.L.I.G. Unikernel and Serverless

VIRTUALIZATION TECHNIQUES

THE RAISE OF VIRTUALIZATION

physicalvirtual

▸ VMware on blades

▸ Public Cloud

▸ Containers

▸ Serverless

1960

2000

today

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

7

Page 11: M.E.L.I.G. Unikernel and Serverless

VIRTUALIZATION TECHNIQUES

THE RAISE OF VIRTUALIZATION

physicalvirtual

▸ VMware on blades

▸ Public Cloud

▸ Containers

▸ Serverless

1960

2000

today

▸ Mainframes

▸ Minicomputers

▸ Unix Servers/Workstations

▸ Windows/Linux on x86

7

Page 12: M.E.L.I.G. Unikernel and Serverless

VIRTUALIZATION TECHNIQUES

TECHNIQUES USED

▸ Virtualization provides 1:n consolidation of machines

SERVER

HOSTKERNEL

HYPERVISORSERVICES

Userland(OS)

KERNEL KERNEL

Userland

SERVICES SERVICES

Traditional Virtualization

Userland

8

Page 13: M.E.L.I.G. Unikernel and Serverless

VIRTUALIZATION TECHNIQUES

TECHNIQUES USED

▸ Virtualization provides 1:n consolidation of machines

▸ Containerization provides OS-level virtualization

SERVER

HOSTKERNEL

HYPERVISORSERVICES

Userland(OS)

KERNEL KERNEL

Userland

SERVICES SERVICES

Traditional Virtualization

Userland

SERVER

HOSTKERNEL

Userland

App1 App2

Linux Container

UserlandUserland

SERVICES

8

Page 14: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardwareTraditional Virtualization Containerization

application

hardware

Page 15: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

userland

application

Traditional Virtualization Containerization

application libs

sys-calls

hardware

Page 16: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

userland

application

Traditional Virtualization Containerization

application libs

sys-calls

hardware

hardware

Page 17: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

userland

application

Traditional Virtualization Containerization

hypervisor

application libs

sys-calls

hardware

hardware

Page 18: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

kernel

userland

application

Traditional Virtualization Containerization

hypervisor

application libs

sys-calls

hardware

hardware

Page 19: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

kernel

userland

application

Traditional Virtualization Containerization

hypervisor

application libs

sys-calls

hardware

hype

r cal

ls

hardware

Page 20: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

kernel

userland

application

Traditional Virtualization Containerization

hypervisor

application libs

sys-calls

hardware

hype

r cal

ls

hardware

virtualization magic (HVM, PV, SR-IOV,

PCI-passthrough, hyper-calls, …)

Page 21: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

kernel

userland

application

Traditional Virtualization Containerization

hypervisor

kernel

application libs

sys-calls

hardware

hype

r cal

ls

hardware

virtualization magic (HVM, PV, SR-IOV,

PCI-passthrough, hyper-calls, …)

Page 22: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

kernel

Container

userland

application

Traditional Virtualization Containerization

lightweight abstractionwith negligible overhead

hypervisor

kernel

application libs

sys-calls

hardware

hype

r cal

ls

hardware

virtualization magic (HVM, PV, SR-IOV,

PCI-passthrough, hyper-calls, …)

Page 23: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

kernel

Container

userland

application

Traditional Virtualization Containerization

lightweight abstractionwith negligible overhead

hypervisor

kernel

application libs

sys-calls

hardware

102

hype

r cal

ls

hardware

virtualization magic (HVM, PV, SR-IOV,

PCI-passthrough, hyper-calls, …)

Page 24: M.E.L.I.G. Unikernel and Serverless

VIRTUALIZATION TECHNIQUES

TECHNIQUES USED

▸ Virtualization provides 1:n consolidation of machines

▸ Containerization provides OS-level virtualization

SERVER

HOSTKERNEL

HYPERVISORSERVICES

Userland(OS)

KERNEL KERNEL

Userland

SERVICES SERVICES

Traditional Virtualization

Userland

SERVER

HOSTKERNEL

Userland

App1 App2

Linux Container

UserlandUserland

SERVICES

10

Page 25: M.E.L.I.G. Unikernel and Serverless

VIRTUALIZATION TECHNIQUES

TECHNIQUES USED

▸ Virtualization provides 1:n consolidation of machines

▸ Containerization provides OS-level virtualization

▸ Uni-Kernels combine bin, libs and kernel

SERVER

HOSTKERNEL

HYPERVISORSERVICES

Userland(OS)

KERNEL KERNEL

Userland

SERVICES SERVICES

Traditional Virtualization

Userland

SERVER

HOSTKERNEL

Userland

App1 App2

Linux Container

UserlandUserland

SERVICESUNIKERNEL

SERVER

HOSTKERNEL

OS

Serverless

App1

10

Page 26: M.E.L.I.G. Unikernel and Serverless

VIRTUALIZATION TECHNIQUES

UNIKERNELS

▸ Extract what is really needed from the OS

▸ Kernel-parts, which the app (libs) uses

▸ No multi-process, multi-user setup

▸ creates a sealed, single-purpose image (VM or HW image)

11

Page 27: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

kernel

Traditional Virtualization

hypervisor

application

hardwareUnikernel

Page 28: M.E.L.I.G. Unikernel and Serverless

kernel

userland

TEXT

hardware

kernel

kernel

Traditional Virtualization

hypervisor

application

hardwareUnikernel

libs

app

Page 29: M.E.L.I.G. Unikernel and Serverless

kernel

userland

TEXT

hardware

kernel

kernel

Traditional Virtualization

hypervisor

application

hardwareUnikernel

libs

app

NET

VFS

+ Network + VFS I/O — Multiuser— Multiprocess — All other FS — …

Page 30: M.E.L.I.G. Unikernel and Serverless

kernel

userland

TEXT

hardware

kernel

kernel

Traditional Virtualization

hypervisor

application

hardwareUnikernel

libs

app

NET

VFS

+ Network + VFS I/O — Multiuser— Multiprocess — All other FS — …

Page 31: M.E.L.I.G. Unikernel and Serverless

userland

TEXT

hardware

kernel

kernel

Traditional Virtualization

hypervisor

application

hardwareUnikernel

+ Network + VFS I/O — Multiuser— Multiprocess — All other FS — …Unikernel

Page 32: M.E.L.I.G. Unikernel and Serverless

DEMOUNIKERNELS

Page 33: M.E.L.I.G. Unikernel and Serverless

SOASOA TO SERVERLESS

Page 34: M.E.L.I.G. Unikernel and Serverless

SERVICE ORIENTED ARCHITECTURE

SERVICE ORIENTED AMBIGUITY

▸ SOA implies an architecture where applications disappear

▸ SOA is about allowing systems to communicate over standard structure

▸ SOA is all about using (mostly) asynchronous messaging

▸ SOA is about exposing software through web services

https://martinfowler.com/bliki/ServiceOrientedAmbiguity.html

15

Page 35: M.E.L.I.G. Unikernel and Serverless

MICROSERVICESSOA TO SERVERLESS

Page 36: M.E.L.I.G. Unikernel and Serverless

MICROSERVICES

SOA DONE RIGHT

▸ run services as distinct processes

▸ communicate over network (HTTP, JSON)

▸ composable pieces

IMG -> https://thenewstack.io/the-new-stack-podcast-show-2-the-rise-of-microservices-in-the-paas-world/

17

Page 37: M.E.L.I.G. Unikernel and Serverless

SERVERLESSSOA TO SERVERLESS

Page 38: M.E.L.I.G. Unikernel and Serverless

SERVERLESS

FROM SERVICE TO FUNCTION

▸ no service-loop

▸ each request is handled individually

▸ by incoming HTTP-call, network package

▸ no state within function itself (lambda)

!K7, Stateless (Album cover)

19

Page 39: M.E.L.I.G. Unikernel and Serverless

SERVERLESS

HOW TO IMPLEMENT?

▸ pre-staged

▸ Watchdog that loops binary (faas)

▸ Blocking binary run

▸ ad-hoc

▸ fire-up function when requests comes in

AWS Lambda

20

Page 40: M.E.L.I.G. Unikernel and Serverless

DEMOFAAS

Page 41: M.E.L.I.G. Unikernel and Serverless

SERVERLESS

HOW TO IMPLEMENT?

▸ Technology

▸ linux container

▸ Docker

▸ special purpose

▸ unikernels

AWS Lambda

22

Page 42: M.E.L.I.G. Unikernel and Serverless

[email protected] @CQnib

QUESTIONS?Thank you for listening