xpds14: unikernels: who, what, where, when, why - adam wick, galois

30
© 2014 Galois, Inc. All rights reserved. Unikernels: Who, What, Where, When, Why? Adam Wick ([email protected] ) Xen Developer Summit | August 19 th , 2014

Upload: the-linux-foundation

Post on 19-May-2015

933 views

Category:

Technology


0 download

DESCRIPTION

Over the last several years, I and others have talked about the promise of unikernels — single-purpose, lightweight virtual machines — in the cloud. However, all of these talks have simply presented our architectures and speculated about their usefulness. Over the last several years, Galois has actually been using unikernels to implement interesting components in critical systems: non-bypassable encryption components, network monitors and alarms, platform obfuscation capabilities, Tor nodes, network re-routers, and so on. In this talk, I will speak briefly on each of them and ask the question: Was a unikernel a good platform for this project? If so, why? If not, why not? What are the general rules we can infer about when unikernels are useful, and what part of the cloud ecosystem they are best suited to serve?

TRANSCRIPT

Page 1: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Unikernels:Who, What, Where, When, Why?

Adam Wick ([email protected])Xen Developer Summit | August 19th, 2014

Page 2: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

?

miniOS

HALVM

Which? When? Why?

Page 3: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

?

miniOS

HALVM

Unikernel: (a.k.a. Library OSes)A single-purpose, single-language virtual machine hosted on a minimal environment.

Page 4: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Unikernels:Who, What, Where, When, Why? • The advantages and disadvantages of

unikernels.

• Where Galois has used them in the past that worked.

• … and didn’t work.

• What general rules we think apply.

Page 5: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

?

Operating System

libC libstdc++ libgcc

libz libgmp libtls

iconv gtk

opengl

Application Application Application

Page 6: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Why?

Page 7: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Why?

Reduced memory footprint. Greatly reduced need for disk

space. Reduced computational burden.

Use less powerful VM classes for the same work, and save money.

Page 8: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Why?

Reduced memory footprint. No extraneous processes taking

up your CPU. Fewer schedulers interrupting

things.

Faster load times, lower latencies.

Page 9: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Why?

Reduced code size. Customized to application. (Potentially) Stronger walls

between disparate components.

Less exposure to general attacks, reduced privileges, reduced attack surface.

Page 10: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

?

Operating System

libC libstdc++ libgcc

libz libgmp libtls

iconv gtk

opengl

Application Application Application

Why not?

If this is what you want, don’t fix what isn’t broken.

Page 11: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

?

Operating System

libC libstdc++ libgcc

libz libgmp libtls

iconv gtk

opengl

Why not?

There is a lot of software for Linux; with a unikernel, you will end up writing these bits and pieces.

Page 12: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Why not?

* These savings come from avoiding some expenses: removing the need for disks, lowering processor costs.

If your application needs them anyways, you’re not going to see any savings.

*

Page 13: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Unikernels:Who, What, Where, When, Why? • The advantages and disadvantages of

unikernels.

• Where Galois has used them in the past that worked.

• … and didn’t work.

• What general rules we think apply.

Page 14: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Mission:To create trustworthiness in critical systems.

Research services and prototype development in computer science.Operating Systems

Networking Cryptography Scientific Computing

Human/Computer InteractionProgramming Lanuages

Formal Methods

SecuritySafetyPrivacyReliabilityPredictabilityIntegrity

W

We built the HaLVM as part of one of our projects, and have successfully used it on many more since then. What have we learned?

Page 15: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Three Main Use Cases

Use Case #1Embedded,Single-Host,DeprivilegedSecurity Apparatus

Use Case #3Highly flexible,Highly mobile,On-demandNetwork Nodes

Use Case #2Lightweight,Scalable,Local NetworkCapabilities

Page 16: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #1

Dom0 DomU

Page 17: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #1

Dom0 DomU

Unavoidable …… encryption.

… filtering.… tunneling.

Page 18: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #1

Unikernels allow for fine-grained separation of concerns:

• Key management• RNG• Encrypt / Decrypt• Networking

Page 19: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #1

Lesson: Unikernels are small and fast, so they make a great platform for building critical security components.

Combine with XSM to use Xen as a lightweight separation kernel.

BUT

Page 20: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #1We have been mostly successful using unikernels in this general area.

dangerous word

The one place it didn’t work: a device driver.

?Operating System

libClibstdc++

libgcclibz libgmp libtls

iconv gtkopengl

Unikernels can make major, mid-stream changes more costly, because their specialization works against them.

Page 21: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Awkward Transition Slide

Page 22: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #2 (Your Network)

Firewalls are nice, but they are going to be broken.(Or dodged.)

How quickly can you detect that someone has broken into yournetwork, and how fast can you respond?

Confuse, distract, delay, discover: Make them work harder, and make them easier to detect.

Unikernels make great hosts for these nodes, because they are lightweight and responsive.

Page 23: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #3 (The Cloud!)

Unikernels have two major advantages over more traditional systems in the cloud:

1. They’re nimble.2. They scale massively.

… as long as your service fits within a certain mold.

Do you need a local disk?

Page 24: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #3: Nimble

Page 25: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #3: Nimble

Page 26: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Use Case #3: Nimble + Massive

Page 27: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Unikernels:Who, What, Where, When, Why? • The advantages and disadvantages of

unikernels.

• Where Galois has used them in the past that worked.

• … and didn’t work.

• What general rules we think apply.

Page 28: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Unikernels

What? A lightweight mechanism for implementing single-service components.

Who? Designers of cloud, local network, or low-level security services.

Where? Useful for securing or rapidly deploying lightweight or security-sensitive services.

When? For situations, like those described, for which the increased cost of development for a unikernel is outweighed by a unikernel’s advantages.

Why? To save money.To improve efficiency.To improve security.

Page 29: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

Summary

Unikernels: Useful for us.

HaLVM: http://halvm.orgMirage: http://openmirage.org

≥?Where will you use them?

Page 30: XPDS14: Unikernels: Who, What, Where, When, Why - Adam Wick, Galois

© 2014 Galois, Inc. All rights reserved.

All trademarks, service marks, trade names, trade dress, product names and logos appearing in these slides are the property of their respective owners, including in some instances Galois, Inc.

All rights are reserved.