muCon2015 - Conduct your microservices with Mesos and Marathon

Click here to load reader

  • date post

    19-Feb-2017
  • Category

    Technology

  • view

    320
  • download

    0

Embed Size (px)

Transcript of muCon2015 - Conduct your microservices with Mesos and Marathon

CONDUCT YOUR MICROSERVICES

CONDUCT YOUR MICROSERVICESOn the path to cloud-native applicationsSylvain Hellegouarch@lawouach

Before you had one big app

Sylvain Hellegouarch@lawouach

Now, you have a zillion of smaller services

Sylvain Hellegouarch@lawouach

Why so many of them?The big app had hidden links and dependencies.

These Functions still exist but their relationships are now public.

Who becomes reponsible for those?Sylvain Hellegouarch@lawouach

Be careful about projecting complexity

Sylvain Hellegouarch@lawouach

Going forwardStandardizeAutomateIsolateOrchestrateMonitorAdapt

Sylvain Hellegouarch@lawouach

Helping the ops!Sysadmins cannot be expected to support thousands of dynamic services the old fashion way

We need a tool to orchestrate all of those pieces together.Sylvain Hellegouarch@lawouach

Orchestration

Microservices lifecycle and relationships conductor

Orchestration brings (some) order to the microservices chaos

Docker SwarmApache Mesos/MarathonGoogle KubernetesCoreOS FleetCloud Foundry Diego

Sylvain Hellegouarch@lawouach

Mesos

Cluster resources sharing

Advertizes resources to high-level schedulers and executors

Isolates executed tasks into mesos or docker containers

Sylvain Hellegouarch@lawouach

Mesos (misc)

Master/slave architecture

Infrastructure neutral

Docker Swarm and Kubernetes can benefit from Mesos

MesosDNS for discovery (though you can use Consul, WeaveDNS too)

Proven: used in production at airbnb, Apple, netflix, Mesosphere

Open Source (Apache 2.0 license)

Sylvain Hellegouarch@lawouach

Marathon: a Mesos framework

Schedules your microservices based on needed vs available resources (offered by Mesos)

Executes microservices and manages their lifecycleSylvain Hellegouarch@lawouach

High level HTTP REST API

Sylvain Hellegouarch@lawouach

Marathon: Specification

Sylvain Hellegouarch@lawouach

Marathon: ResourcesHow much do you need?

Match Marathons agent role set at startup

Sylvain Hellegouarch@lawouach

How should it be deployed?

Match Mesos slave attributesUNIQUE, GROUP BY, CLUSTER, LIKE, UNLIKE

Marathon: Constraints

Sylvain Hellegouarch@lawouach

What is the upgrade/rollback strategy?

Ensures service continuity

Marathon: Upgrade

Sylvain Hellegouarch@lawouach

Input for redundancy/failure scenarios

Ensures service availability

Marathon: Health-check

Sylvain Hellegouarch@lawouach

Relationships to other services

Manages relationships

Marathon: Dependencies

Sylvain Hellegouarch@lawouach

Marathon: Application definition

Sylvain Hellegouarch@lawouach

Marathon: MoreApplication groups supported

Deployment events feedack

Straight documentation

Sylvain Hellegouarch@lawouach

Marathon: ChallengesNo command line, less natural for scripting

Can Marathon cope with the speed of changes brought on Docker itself?

Not a simple debugging experience

AFAIK, docker containers are never removed automatically

Might be too generic for your use caseSylvain Hellegouarch@lawouach

Marathon: Getting started?Design your system so that it copes with interruptions

Define your deployment workflows carefully: install, upgrade, rollback, failover...

Use a service discovery (weave, consul, etcd, MesosDNS)

Consider using an overlay network to decouple your network from the infrastructure (weave, VXLAN)

Sylvain Hellegouarch@lawouach

Whats next?

Explore but be patient!

Build familiarity to gain trust and confidence

Sylvain Hellegouarch@lawouach

Thank you!

Questions?

sylvain.hellegouarch@simplicityitself.comSylvain Hellegouarch@lawouach