characterizing and contrasting container orchestrators

58
Characterizing and Contrasting Container Orchestrators Lee Calcote http://calcotestudios.com/ccco

Upload: lee-calcote

Post on 07-Apr-2017

266 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Characterizing and Contrasting Container Orchestrators

CharacterizingandContrastingContainer

Orchestrators

LeeCalcote

http://calcotestudios.com/ccco

Page 2: Characterizing and Contrasting Container Orchestrators

LeeCalcoteclouds,containers,infrastructure,applications

andtheirmanagement

linkedin.com/in/leecalcote

@lcalcote

blog.gingergeek.com

[email protected]

Page 3: Characterizing and Contrasting Container Orchestrators

[kuhn-tey-ner][awr-kuh-streyt-or]

Definition:

Page 4: Characterizing and Contrasting Container Orchestrators

FleetNomadSwarm

KubernetesMesos+Marathon

(Staytunedforupdatestopresentation)

Page 5: Characterizing and Contrasting Container Orchestrators
Page 6: Characterizing and Contrasting Container Orchestrators
Page 7: Characterizing and Contrasting Container Orchestrators

CategoricallySpeaking

Page 8: Characterizing and Contrasting Container Orchestrators

CategoricallySpeakingGenesis&Purpose

Page 9: Characterizing and Contrasting Container Orchestrators

CategoricallySpeakingGenesis&PurposeSupport&Momentum

Page 10: Characterizing and Contrasting Container Orchestrators

CategoricallySpeakingGenesis&PurposeSupport&MomentumHost&ServiceDiscovery

Page 11: Characterizing and Contrasting Container Orchestrators

CategoricallySpeaking

Scheduling

Genesis&PurposeSupport&MomentumHost&ServiceDiscovery

Page 12: Characterizing and Contrasting Container Orchestrators

CategoricallySpeaking

Scheduling

Genesis&PurposeSupport&MomentumHost&ServiceDiscovery

Modularity&Extensibility

Page 13: Characterizing and Contrasting Container Orchestrators

CategoricallySpeaking

Scheduling

Genesis&PurposeSupport&MomentumHost&ServiceDiscovery

Modularity&ExtensibilityUpdates&Maintenance

Page 14: Characterizing and Contrasting Container Orchestrators

CategoricallySpeaking

Scheduling

Genesis&PurposeSupport&MomentumHost&ServiceDiscovery

Modularity&ExtensibilityUpdates&MaintenanceHealthMonitoring

Page 15: Characterizing and Contrasting Container Orchestrators

CategoricallySpeaking

Scheduling

Genesis&PurposeSupport&MomentumHost&ServiceDiscovery

Modularity&ExtensibilityUpdates&MaintenanceHealthMonitoringNetworking&Load-Balancing

Page 16: Characterizing and Contrasting Container Orchestrators

CategoricallySpeaking

Scheduling

Genesis&PurposeSupport&MomentumHost&ServiceDiscovery

Modularity&ExtensibilityUpdates&MaintenanceHealthMonitoringNetworking&Load-BalancingHighAvailability&Scale

Page 17: Characterizing and Contrasting Container Orchestrators

HypervisorManagerElements

ComputeNetworkStorage

ContainerOrchestratorElements

Host(Node)ContainerServiceVolumeApplications

Page 18: Characterizing and Contrasting Container Orchestrators

CoreCapabilities

Scheduling

ClusterManagement

HostDiscovery

HostHealthMonitoring

OrchestratorUpdatesandHost

Maintenance

ServiceDiscovery

NetworkingandLoad-Balancing

AdditionalKeyCapabilitiesApplicationHealthMonitoring

ApplicationDeployments

ApplicationPerformanceMonitoring

Page 19: Characterizing and Contrasting Container Orchestrators

DockerSwarm

Page 20: Characterizing and Contrasting Container Orchestrators

Genesis&PurposeSwarmissimpleandeasytosetup.Animperativesystem,Swarmisresponsiblefortheclusteringandschedulingaspectsoforchestration.Swarm’sarchitectureisnotcomplexasthoseofKubernetesandMesos

hasManager(s)andAgent(s)

WritteninGolang,Swarmislightweight,modular,portable,andextensible

Page 21: Characterizing and Contrasting Container Orchestrators
Page 22: Characterizing and Contrasting Container Orchestrators

Support&Momentum~3,000commitsby12coremaintainers(130contributorsinall),andforDockerCompose,thenumbersareapproximatelythesameSwarmleveragesthesameAPIforDockerenginewhichover23,000commitsand1,350contributors

~250DockermeetupsworldwideAnnouncedasproduction-ready5monthsago(Nov2015)

image:digitaltrends

Page 23: Characterizing and Contrasting Container Orchestrators

Host&ServiceDiscoveryHostDiscovery

usedintheformationofclustersbytheManagertodiscoverforNodes(hosts).

ServiceDiscovery

SwarmhasaconceptofservicesthroughnetworkaliasesandroundrobinDNS

image:iStock

Page 24: Characterizing and Contrasting Container Orchestrators

SchedulingSwarm’sschedulerispluggableSwarmschedulingisacombinationofstrategiesandfilters/constraint:Strategies

RandomBinpackSpread*

Filterscontainerconstraints(affinity,dependency,port)aredefinedas

environmentvariablesinthespecificationfile

nodeconstraints(health,constraint)mustbespecifiedwhen

startingthedockerdaemonanddefinewhichnodesacontainer

maybescheduledon.image:pickywallpapers

Page 25: Characterizing and Contrasting Container Orchestrators

Modularity&ExtensibilityAbilitytoremovebatteriesisastrengthforSwarm:

PluggableschedulerPluggablenetworkdriverPluggabledistributedK/VstoreDockercontainerengineruntime-only

image: AlanChia

Page 26: Characterizing and Contrasting Container Orchestrators

Updates&Maintenance

Nodes

Manualswarmmanagerandagentupdates

Applications

Nofacilitiesforupdatingapplication

image:123RF

Page 27: Characterizing and Contrasting Container Orchestrators

HealthMonitoringNodes

Swarmmonitorstheavailabilityandresourceusageofnodeswithinthecluster

Applications

NofacilitiesformonitoringapplicationsUsethird-partysoftware

Page 28: Characterizing and Contrasting Container Orchestrators

Networking&Load-Balancing

DockerSwarmisfullycompatiblewithDocker’snetworkingDockermulti-hostnetworking(requiresaK/Vstore)providesforuser-definedoverlaynetworksthataremicro-segmentable

usesagossipprotocolforquickconvergenceofneighbortable

facilitatescontainernameresolutionviaembeddedDNSserver

(previouslyviaetc/hosts)

YoumaybringyourownnetworkdriverLoad-balancingisnewin1.11.0

-nodocumentationavailable

Page 29: Characterizing and Contrasting Container Orchestrators

HighAvailability&ScaleManagersmaybedeployedinahighly-availableconfiguration(outofexperimentalin1.11.0)

Active/Standby-anactivemanagerandreplicasconfiguration

Reschedulinguponnodefailure(experimentalin1.11.0)andsimple.Rebalancingisnotavailable

Rescheduledcontainersloseaccesstovolumesmountedontheformerhost.

usevolumepluginslikeFlockertoavoidthis

Doesnotsupportmultiplefailureisolationregionsorfederation(although,withcaveats, ).

thisispossible

Page 30: Characterizing and Contrasting Container Orchestrators

Scalingswarmto1,000AWSnodesand50,000containers

Page 31: Characterizing and Contrasting Container Orchestrators

Suitablefororchestratingacombinationofinfrastructurecontainers

Lessbuilt-infunctionalityforapplicationcontainers

Swarmisayoungprojectandlacksadvancedfeatures.

HighAvailabilityoutofexperimentalasoflatestrelease(1.11.0)

Reschedulingisexperimentalin1.11.0(noRebalancing,yet)

Load-balancingin1.11.0?Swarmneedstobeusedwiththird-partysoftware.

OnlyschedulesDockercontainers,notcontainersusingotherspecifications.

Whiledependencyandaffinityfiltersareavailable,Swarmdoesnotprovide

theabilitytoenforceschedulingoftwocontainersontothesamehostornot

atall.

Currentfiltersdonotfacilitatesidecarpattern.No“pod”concept.

Swarmworks.Swarmissimpleandeasyto

deploy.

IfyoualreadyknowDockerCLI,usingSwarm

isstraight-forward

facilitatesearlierstagesofadoptionby

organizationsviewingcontainersasfasterVMs

Lessbuilt-infunctionalityforapplications

Swarmiseasytoextend,ifcanalready

knowDockerAPIs,youcancustomizeSwarm

Highlymodular:

Pluggablescheduler

PluggableK/Vstoreforbothnodeandmulti-

hostnetworking

Page 32: Characterizing and Contrasting Container Orchestrators

Kubernetes

Page 33: Characterizing and Contrasting Container Orchestrators

Genesis&Purposeanopinionatedframeworkforbuildingdistributedsystems

orasitstaglinestates"anopensourcesystemforautomating

deployment,scaling,andoperationsofapplications."

WritteninGolang,Kubernetesislightweight,modular,portable,andextensibleconsideredathirdgenerationcontainerorchestratorledbyGoogle,RedHatandothers.

bakesinload-balancing,scale,volumes,deploymentsandsecret

managementamongotherfeatures.

Declaratively,opinionatedwithmanykeyfeaturesincluded

Page 34: Characterizing and Contrasting Container Orchestrators
Page 35: Characterizing and Contrasting Container Orchestrators

Support&MomentumKubernetesisyoung(abouttwoyearsold)

Announcedasproduction-ready10monthsago(July2015)

Projectcurrentlyhasover1,000commitspermonth(~23,000total)

madebyabout100(650total)Kubernauts(Kubernetesenthusiasts).~5,000commitsmadeinthelatestrelease-1.2.

UnderthegovernanceoftheCloudNativeComputingFoundationRobustsetofdocumentationand~90meetups

Page 36: Characterizing and Contrasting Container Orchestrators

Host&ServiceDiscoveryHostDiscovery

bydefault,thenodeagent(kubelet)isconfiguredtoregisteritselfwiththemaster(APIserver)

automatingthejoiningofnewhoststothecluster.

ServiceDiscoveryTwoprimarymodesoffindingaService

environmentvariables

environmentvariablesareusedasasimplewayofprovidingcompatibilitywithDockerlinks-style

networking

DNS

whenenabledisdeployedasaclusteradd-on image:iStock

Page 37: Characterizing and Contrasting Container Orchestrators

Scheduling

Bydefault,schedulingishandledbykube-scheduler.PluggableSelectioncriteriausedbykube-schedulertoidentifythebest-fitnodeisdefinedbypolicy:

Predicates(noderesourcesandcharacteristics):

PodFitPorts,PodFitsResources,NoDiskConflict

,MatchNodeSelector,HostName,ServiceAffinit,LabelsPresence

Priorities(weightedstrategiesusedtoidentify“bestfit”node):

LeastRequestedPriority,BalancedResourceAllocation,ServiceSpreadingPriority,

EqualPriority

Page 38: Characterizing and Contrasting Container Orchestrators

Modularity&Extensibility

OneofKubernetesstrengthsitspluggablearchitectureChoiceof:

databaseforservicediscoveryornetworkdrivercontainerruntime

usersmaychoosetorunDockerwithRocketcontainers

Clusteradd-onsoptionalsystemcomponentsthatimplementaclusterfeature(e.g.DNS,logging,etc.)shippedwiththeKubernetesbinariesandareconsideredaninherentpartoftheKubernetesclusters

Page 39: Characterizing and Contrasting Container Orchestrators

Updates&MaintenanceApplications

Deploymentobjectsautomatedeployingandrollingupdatingapplications.

KubernetesComponents

UpgradingtheKubernetescomponentsandhostsisdoneviashellscriptHostmaintenance-markthenodeasunschedulable.

existingpodsarenotvacatedfromthenodepreventsnewpodsfrombeingscheduledonthenode

image:123RF

Page 40: Characterizing and Contrasting Container Orchestrators

HealthMonitoringNodes

Failures-activelymonitorsthehealthofnodeswithinthecluster

viaNodeController

Resources-usagemonitoringleveragesacombinationofopensourcecomponents:

cAdvisor,Heapster,InfluxDB,Grafana

Applications

threetypesofuser-definedapplicationhealth-checksandusestheKubeletagentasthethehealthcheckmonitor

HTTPHealthChecks,ContainerExec,TCPSocket

Cluster-levelLogging

collectlogswhichpersistbeyondthelifetimeofthepod’scontainerimagesorthelifetimeofthepodorevencluster

standardoutputandstandarderroroutputofeachcontainercanbeingestedusinga

Page 41: Characterizing and Contrasting Container Orchestrators

Networking&Load-Balancing

…enterthePod

atomicunitofschedulingflatnetworkingwitheachpodreceivinganIPaddressnoNATrequired,portconflictslocalizedintra-podcommunicationvialocalhost

Load-Balancing

Servicesprovideinherentload-balancingviakube-proxy:

runsoneachnodeofaKubernetescluster

reflectsservicesasdefinedintheKubernetesAPI

supportssimpleTCP/UDPforwardingandround-robinandDocker-links-

basedserviceIP:PORTmapping.

Page 42: Characterizing and Contrasting Container Orchestrators

HighAvailability&Scale

Eachmastercomponentmaybedeployedinahighly-availableconfiguration.

Active/Standbyconfiguration

Intermsofscale,v1.2bringssupportfor1,000nodeclustersandasteptowardfully-federatedclusters(Ubernetes)Application-levelauto-scalingissupportedwithinKubernetesviaReplicationControllers

Page 43: Characterizing and Contrasting Container Orchestrators

Onlyrunscloud-nativeapplications

ForthosefamiliarwithDocker-only,

Kubernetesrequiresunderstandingofnew

concepts

Powerfulframeworkswithmoremovingpiecesbeget

complicatedclusterdeploymentandmanagement.

Lightweightgraphicaluserinterface

Doesnotprovideassophisticatedtechniques

forresourceutilizationasMesos

Kubernetescanscheduledockerorrkt

containers

Inherentlyopinionatedwithfunctionalitybuilt-

in.

nothird-partysoftwareneededtorunservices,load-

balancing,

buildsinmanyapplication-levelconceptsandservices

(secrets,petsets,jobsets,daemonsets,rollingupdates,etc.)

Kubernetesarguablymovingthequickest

Relativelythoroughprojectdocumentation

Multi-master,Robustlogging&metrics

aggregation

Page 44: Characterizing and Contrasting Container Orchestrators

Mesos+

Marathon

Page 45: Characterizing and Contrasting Container Orchestrators

Genesis&PurposeMesosisadistributedsystemskernel

stitchestogethermanydifferentmachinesintoalogicalcomputer

Mesoshasbeenaroundthelongest(launchedin2009)andisarguablythemoststable,withhighest(proven)scalecurrently

MessiswritteninC++withJava,PythonandC++APIs

FrameworksMarathonisoneofanumberofframeworks(ChronosandAuroraother

examples)thatmayberunontopofMesos

Frameworkshaveaschedulerandexecutor.Schedulersgetresource

offers.Executorsruntasks.

MarathoniswritteninScala

Page 46: Characterizing and Contrasting Container Orchestrators
Page 47: Characterizing and Contrasting Container Orchestrators

Support&Momentum

MesosCon2015inSeattlehad700attendeesupfrom262attendeesin2014

78contributorsinthelastyear

UnderthegovernanceofApacheFoundationUsedbyTwitter,AirBnb,eBay,Apple,Cisco,Yodle

Page 48: Characterizing and Contrasting Container Orchestrators

Host&ServiceDiscovery

Mesos-DNSgeneratesanSRVrecordforeachMesostask

includingMarathonapplicationinstances

MarathonwillensurethatalldynamicallyassignedserviceportsareuniqueMesos-DNSisparticularlyusefulwhen:

appsarelaunchedthroughmultipleframeworks(notjustMarathon)

youareusinganIP-per-containersolutionlike

youuserandomhostportassignmentsinMarathon

ProjectCalico

image:iStock

Page 49: Characterizing and Contrasting Container Orchestrators

Scheduling

TwolevelschedulerFirstlevelschedulinghappensatmesosmasterbasedonallocationpolicy,whichdecideswhichframeworkgetresourcesSecondlevelschedulinghappensatFrameworkscheduler,whichdecideswhattaskstoexecute.

Providereservationsandoversubscriptions

Page 50: Characterizing and Contrasting Container Orchestrators

Modularity&ExtensibilityFrameworks

multipleavailablemayrunmultipleframeworks

Modules

hasthreetypesofModulesReplacement,Hook,Anonymous

Page 51: Characterizing and Contrasting Container Orchestrators

Updates&Maintenance

Nodes-MesoshasmaintenancemodeApplications

Marathoncanbeinstructedtodeploycontainersbasedonthatcomponentusingablue/greenstrategy

whereoldandnewversionsco-existfora

time.

image:123RF

Page 52: Characterizing and Contrasting Container Orchestrators

HealthMonitoringNodes

Mastertracksasetofstatisticsandmetricstomonitorresourceusage

CountersandGauges

Applications

supportforhealthchecks(HTTPandTCP)aneventstreamthatcanbeintegratedwithload-balancersorforanalyzingmetrics

Page 53: Characterizing and Contrasting Container Orchestrators

Networking&Load-Balancing

Networking

AnIPperContainerNolongersharethenode'sIP

Helpsremoveportconflicts

Enables3rdpartynetworkdrivers

Load-Balancing

MarathonofferstwoTCP/HTTPproxy.Asimpleshellscriptandamorecomplexonecalledmarathon-lbthat

hasmorefeatures.

Pluggable(e.g.Traeficforload-balancing)

Page 54: Characterizing and Contrasting Container Orchestrators

HighAvailability&ScaleAstrengthofMesos’sarchitecture

requiresmasterstoformaquorumusingZooKeeper

onlyoneActive(Leader)Marathonmasterat-a-time

ScaleisastrongsuitforMesos.UsedatTwitter,AirBnB...TBDforMarathon

Greatatasynchronousjobs.Highavailabilitybuilt-in.Referredtoasthe“goldenstandard”bySolomonHykes,DockerCTO.

Page 55: Characterizing and Contrasting Container Orchestrators

UniversalContainerizer

abstractawayfromDockerEngine,(runc,appc)

Canrunmultipleframeworks,includingKubernetesandSwarm.

Onlyofthecontainerorchestratorsthatsupportsmulti-tenancy

GoodforBigDatahouseandjob-orientedortask-orientedworkloads.

Goodformixedworkloadsandwithdata-localitypolicies

Powerfulandscalable,Battle-tested

Goodformultiplelargethingsyouneedtodo10,000+nodeclustersystem

MarathonUIisyoung,butpromising

Stillneeds3rdpartytools

MarathoninterfacecouldbemoreDockerfriendly

(hardtogetatvolumesandregistry)

MayneedadedicatedinfrastructureITteam

anoverlycomplexsolutionforsmalldeployments

Page 56: Characterizing and Contrasting Container Orchestrators

Summary

Page 57: Characterizing and Contrasting Container Orchestrators

Ahigh-levelperspectiveofthecontainerorchestratorspectrum.

Page 58: Characterizing and Contrasting Container Orchestrators

LeeCalcote

linkedin.com/in/leecalcote

@lcalcote

blog.gingergeek.com

[email protected]

Thankyou.Questions?