mucon2015 - conduct your microservices with mesos and marathon

24
CONDUCT YOUR MICROSERVICES On the path to cloud-native applications Sylvain Hellegouarch @lawouach

Upload: sylvain-hellegouarch

Post on 19-Feb-2017

322 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: muCon2015 - Conduct your microservices with Mesos and Marathon

CONDUCT YOUR MICROSERVICESOn the path to cloud-native applications

Sylvain Hellegouarch@lawouach

Page 2: muCon2015 - Conduct your microservices with Mesos and Marathon

Before you had one big app

Sylvain Hellegouarch@lawouach

Page 3: muCon2015 - Conduct your microservices with Mesos and Marathon

Now, you have a zillion of smaller services

Sylvain Hellegouarch@lawouach

Page 4: muCon2015 - Conduct your microservices with Mesos and Marathon

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

Page 5: muCon2015 - Conduct your microservices with Mesos and Marathon

Be careful about projecting complexity

Sylvain Hellegouarch@lawouach

Page 6: muCon2015 - Conduct your microservices with Mesos and Marathon

Going forward…

StandardizeAutomate

IsolateOrchestrate

MonitorAdapt

Sylvain Hellegouarch@lawouach

Page 7: muCon2015 - Conduct your microservices with Mesos and Marathon

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

Page 8: muCon2015 - Conduct your microservices with Mesos and Marathon

Orchestration

Microservices lifecycle and relationships conductor

Orchestration brings (some) order to the microservices chaos

➢ Docker Swarm➢ Apache Mesos/Marathon➢ Google Kubernetes➢ CoreOS Fleet➢ Cloud Foundry Diego

Sylvain Hellegouarch@lawouach

Page 9: muCon2015 - Conduct your microservices with Mesos and Marathon

Mesos

Cluster resources sharing

Advertizes resources to high-level schedulers and executors

Isolates executed tasks into mesos or docker containers

Sylvain Hellegouarch@lawouach

Page 10: muCon2015 - Conduct your microservices with Mesos and Marathon

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

Page 11: muCon2015 - Conduct your microservices with Mesos and Marathon

Marathon: a Mesos framework

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

Executes microservices and manages their lifecycle

Sylvain Hellegouarch@lawouach

Page 12: muCon2015 - Conduct your microservices with Mesos and Marathon

High level HTTP REST API

Sylvain Hellegouarch@lawouach

Page 13: muCon2015 - Conduct your microservices with Mesos and Marathon

Marathon: Specification

Sylvain Hellegouarch@lawouach

Page 14: muCon2015 - Conduct your microservices with Mesos and Marathon

Marathon: Resources

How much do you need?

➢ Match Marathon’s agent role set at startup

Sylvain Hellegouarch@lawouach

Page 15: muCon2015 - Conduct your microservices with Mesos and Marathon

How should it be deployed?

➢ Match Mesos slave attributes➢ UNIQUE, GROUP BY, CLUSTER,

LIKE, UNLIKE…

Marathon: Constraints

Sylvain Hellegouarch@lawouach

Page 16: muCon2015 - Conduct your microservices with Mesos and Marathon

What is the upgrade/rollback strategy?

➢ Ensures service continuity

Marathon: Upgrade

Sylvain Hellegouarch@lawouach

Page 17: muCon2015 - Conduct your microservices with Mesos and Marathon

Input for redundancy/failure scenarios

➢Ensures service availability

Marathon: Health-check

Sylvain Hellegouarch@lawouach

Page 18: muCon2015 - Conduct your microservices with Mesos and Marathon

Relationships to other services

➢ Manages relationships

Marathon: Dependencies

Sylvain Hellegouarch@lawouach

Page 19: muCon2015 - Conduct your microservices with Mesos and Marathon

Marathon: Application definition

Sylvain Hellegouarch@lawouach

Page 20: muCon2015 - Conduct your microservices with Mesos and Marathon

Marathon: More…

Application groups supported

Deployment events feedack

Straight documentation

Sylvain Hellegouarch@lawouach

Page 21: muCon2015 - Conduct your microservices with Mesos and Marathon

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 case

Sylvain Hellegouarch@lawouach

Page 22: muCon2015 - Conduct your microservices with Mesos and Marathon

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

Page 23: muCon2015 - Conduct your microservices with Mesos and Marathon

What’s next?

Explore but be patient!

Build familiarity to gain trust and confidence

Sylvain Hellegouarch@lawouach

Page 24: muCon2015 - Conduct your microservices with Mesos and Marathon

Thank you!

Questions?

[email protected]

Sylvain Hellegouarch@lawouach