© Copyright 2016 EMC Corporation. All rights reserved. 1 RUNNING STATEFUL SERVICES ON CLOUD NATIVE PLATFORMS WITH MESOS JONAS ROSLAND, EMC {code} KEITH CHAMBERS, MESOSPHERE © Copyright 2016 EMC Corporation. All rights reserved. 2 BACK IN THE OLD DAYS • Clustered servers • Manual deployments • Redundancy, not necessarily high availability © Copyright 2016 EMC Corporation. All rights reserved. 5 THEN SOME TIME AGO • Infrastructure as a Service • Deploy virtual machines • Manual/half-automated way of deploying apps • Almost efficient © Copyright 2016 EMC Corporation. All rights reserved. 6 NOW – CLOUD NATIVE PLATFORMS • Collection of compute resources • Spread out horizontally • Brings scale to your deployments © Copyright 2016 EMC Corporation. All rights reserved. 7 CLOUD NATIVE SITS ON TOP OF SCHEDULERS © Copyright 2016 EMC Corporation. All rights reserved. 8 Standard definitions © Copyright 2016 EMC Corporation. All rights reserved. 9 APPLICATIONS RUN IN CONTAINERS Code © Copyright 2016 EMC Corporation. All rights reserved. Code and requirements Container 10 APPLICATION STATE DIFFERENCES • Storing data (state) is a critical component of any application • Where they store this state defines their class – Connected database – In memory – Local disk © Copyright 2016 EMC Corporation. All rights reserved. 11 STATELESS APPLICATIONS • Store no critical data locally • Can be scaled as needed • Recovers quickly © Copyright 2016 EMC Corporation. All rights reserved. 12 STATEFUL SERVICES • Services that store state • Have usually been treated as HA apps • Can be scale-out or scale-up © Copyright 2016 EMC Corporation. All rights reserved. 13 APPLICATIONS BUILT FROM SERVICES Front End or Non-Persistent Language Specific HTTP Redis Apache Mysql Postgres MongoDB MariaDB Nginx Memcached CouchDB Elastic Search Hadoop Cassandra ScaleIO Data Services (Persistent) © Copyright 2016 EMC Corporation. All rights reserved. RabbitMQ ECS Scale-Out Scale-Up Rails Tomcat HAProxy 14 STATEFUL SERVICES IN CONTAINERS? • No! – Without proper storage mapped, the service will lose data • Yes! – Mapping storage backends such as ScaleIO, VMAX, Isilon and more enables your data to be stored safely © Copyright 2016 EMC Corporation. All rights reserved. 15 CLOUD NATIVE PLATFORMS • Have been mostly focused on stateless apps • Working hard on making stateful services part of their inventory • How do you handle both types? © Copyright 2016 EMC Corporation. All rights reserved. 16 EXAMPLE 1 • Data is stored outside the platform © Copyright 2016 EMC Corporation. All rights reserved. 17 EXAMPLE 2 • Data is stored on the same platform © Copyright 2016 EMC Corporation. All rights reserved. 18 PERSISTENCE AND P3 Highly Available High Availability Live Migration Lifecycle Management Lifecycle Management Virtual Machine Container Platform Container Platform Platform 2 © Copyright 2016 EMC Corporation. All rights reserved. Platform 3 19 CLOUD NATIVE APPS AND STORAGE • Cloud native applications have no concept of local storage • They require state being stored somewhere else • So we need our platform to understand storage © Copyright 2016 EMC Corporation. All rights reserved. 20 Making the platform understand storage © Copyright 2016 EMC Corporation. All rights reserved. 21 LET’S START WITH THE BASICS ? EMC © Copyright 2016 EMC Corporation. All rights reserved. AWS GCE OpenStack 22 SAY HELLO TO MY LITTLE FRIEND – REX-RAY © Copyright 2016 EMC Corporation. All rights reserved. 23 NOW WE’RE GETTING SOMEWHERE EMC © Copyright 2016 EMC Corporation. All rights reserved. AWS GCE OpenStack 24 AND NOW IT’S GETTING INTERESTING Kubernetes Mesos EMC © Copyright 2016 EMC Corporation. All rights reserved. AWS GCE OpenStack 25 REX-RAY BENEFITS • Gives you the possibility to use any storage platform, and even multiple platforms at the same time • Always in sync with Docker’s development cycle • Integrated with Docker, Mesos and Kubernetes © Copyright 2016 EMC Corporation. All rights reserved. 26 So how does this work with Mesos? © Copyright 2016 EMC Corporation. All rights reserved. 27 DEMO • Run Cloud Foundry on Mesos • Push stateless app • No database connection • Start database on Mesos with ScaleIO • Restart app with correct binding • Stateless app now has state, all on CF and Mesos © Copyright 2016 EMC Corporation. All rights reserved. 28 SUMMARY • You already have your apps divided into stateless and stateful • Focus on your stateless apps first • Make real decisions to move from archaic masterslave clusters • Move to new platforms to handle your old, new and expanding apps © Copyright 2016 EMC Corporation. All rights reserved. 29 Before opening up for questions © Copyright 2016 EMC Corporation. All rights reserved. 30 Questions? @EMCcode @jonasrosland emccode.com community.emccode.com © Copyright 2016 EMC Corporation. All rights reserved. Come visit us at Booth #1044 or in the vLab 31 © Copyright 2016 EMC Corporation. All rights reserved. 34