SlideShare a Scribd company logo
1 of 22
Download to read offline
Building	High	Scalable	Framework on	
Apache Mesos
RAHUL	KUMAR
TECHNICAL	LEAD,	SIGMOID
“A distributed system is a collection of independent
computers that appears to its
users as a single coherent system.”
A distributed system application works independently
and communication through messages.
q Resource Sharing
q Openness
q Concurrency
q Scalability
q Fault Tolerance
q Transparency
Mesos	Intro
“Apache Mesos abstracts CPU, memory, storage,
and other compute resources away from machines
(physical or virtual), enabling fault-tolerant and
elastic distributed systems to easily be built and
run effectively.”
Software	Projects	Built	on	Mesos
q Aurora is	a	service	scheduler	that	runs	on	top	of	Mesos,	enabling	you	to	run	long-running	
services	that	take	advantage	of	Mesos'	scalability,	fault-tolerance,	and	resource	isolation.
q Marathon is	a	private	PaaS	built	on	Mesos.	It	automatically	handles	hardware	or	software	
failures	and	ensures	that	an	app	is	“always	on”.
q Spark is	a	fast	and	general-purpose	cluster	computing	system	which	makes	parallel	jobs	easy	
to	write.
q Chronos is	a	distributed	job	scheduler	that	supports	complex	job	topologies.	It	can	be	used	as	
a	more	fault-tolerant	replacement	for	Cron.
q ElasticSearch is	a	distributed	search	engine.	Mesos	makes	it	easy	to	run	and	scale.
Create	own	Framework
Why	we	need	to	write	own	framework	:
q Custom	scheduling
q Auto	scaling
q Advanced	Task	Management
Why	Mesos	
q Task	Distribution
q Launching,	Monitoring,	failure	detection
q Resource	isolation
q Container	support
q Messaging	between	Tasks
q Make	State	distributed
Language	Support
Protocol	Buffer
Protocol	buffers	are used	extensively	for	messaging	and	
serialization	inside	Mesos	and	when	developing	Mesos	
frameworks.
- Tasks	are	describe	in	Protocol	buffer	message
- It	helps	it	to	make	language	independent
message	FrameworkInfo{		
required	string	name	=	2;	
optional	FrameworkID id	=	3;		
optional	double	failover_timeout=	4	[default	=	0.0];		
optional	bool	checkpoint	=	5	[default	=	false];		
optional	string	role	=	6	[default	=	"*"];		
optional	string	hostname	=	7;				
optional	string	principal	=	8;		
optional	string	webui_url=	9;		
message	Capability	{				
enum Type	{						
UNKNOWN	=	0;						
REVOCABLE_RESOURCES	=	1;						
TASK_KILLING_STATE	=	2;				
}				optional	Type	type	=	1;		}		repeated	Capability	capabilities	=	10;		optional	Labels	
labels	=	11;}
import	org.apache.mesos.Protos.FrameworkInfo
val framework	=	FrameworkInfo.newBuilder.
setName(“SigApp”).
setUser(”rahul").
setRole("*").
setCheckpoint(false).
setFailoverTimeout(0.0d).
build()
The	Scheduler
The	scheduler	is	the	component	that	interacts	directly	with	the	
leading	Mesos	master
q Launch	tasks	on	the	received	offers
q Handle	status	updates	checking	for	task	failure	and	restart
q State	Persist	and	manage	failovers
Your	framework	scheduler	should	inherit	from	the Scheduler class
scheduler	should	create	a	SchedulerDriver ,	which	will	mediate	
communication	between	your	scheduler	and	the	Mesos	master.
class	SigScheduler()	 extends	Scheduler	{
override	def error(driver:	 SchedulerDriver,	 message:	String)	{}
override	def executorLost(driver:	SchedulerDriver,	 executorId:	ExecutorID,	slaveId:	SlaveID,	status:	Int)	{}
override	def slaveLost(driver:	SchedulerDriver,	 slaveId:	SlaveID)	{}
override	def disconnected(driver:	 SchedulerDriver)	 {}
override	def frameworkMessage(driver:	 SchedulerDriver,	 executorId:	ExecutorID,	slaveId:	SlaveID,	data:	Array[Byte])	{}
override	def statusUpdate(driver:	SchedulerDriver,	 status:	TaskStatus)	{
println(s"received status	update	$status")
}
override	def offerRescinded(driver:	 SchedulerDriver,	 offerId:	OfferID)	{}
override	def resourceOffers(driver:	 SchedulerDriver,	 offers:	java.util.List[Offer])	{
//	code
}
def submitTasks(tasks:	String*)	=	{
this.synchronized {
this._tasks.enqueue(tasks:	_*)
}
}
override	def reregistered(driver:	 SchedulerDriver,	 masterInfo:	MasterInfo)	{}
override	def registered(driver:	 SchedulerDriver,	 frameworkId:	FrameworkID,	masterInfo:	MasterInfo)	{}
The	Executor
q Executer	Executing	tasks	as	requested	by	the	scheduler
q Keeping	the	scheduler	informed	of	the	status	of	those	tasks
q Task	Management
val exec	= new Executor {
override def launchTask(driver: ExecutorDriver, task: TaskInfo)	: Unit ={}
override def killTask(driver: ExecutorDriver, taskId: TaskID)	: Unit ={}
override def shutdown	(driver: ExecutorDriver, taskId: TaskID)	: Unit ={}
}
Mesos	Endpoints
qHTTP	endpoints	available	for	a	given	Mesos	process
http://master.com:5050/files/browse
http://master.com:5050/files/browse/files/debug
http://master.com:5050/files/browse
http://master.com:5050/api/v1/scheduler
http://master.com:5050/health
Thank You
Q/A

More Related Content

What's hot

Real-time personal trainer on the SMACK stack
Real-time personal trainer on the SMACK stackReal-time personal trainer on the SMACK stack
Real-time personal trainer on the SMACK stackAnirvan Chakraborty
 
Apache Cassandra overview
Apache Cassandra overviewApache Cassandra overview
Apache Cassandra overviewElifTech
 
An Introduction to Distributed Search with Datastax Enterprise Search
An Introduction to Distributed Search with Datastax Enterprise SearchAn Introduction to Distributed Search with Datastax Enterprise Search
An Introduction to Distributed Search with Datastax Enterprise SearchPatricia Gorla
 
Pipedrive DW on AWS
Pipedrive DW on AWSPipedrive DW on AWS
Pipedrive DW on AWSPipedrive
 
Using Spark, Kafka, Cassandra and Akka on Mesos for Real-Time Personalization
Using Spark, Kafka, Cassandra and Akka on Mesos for Real-Time PersonalizationUsing Spark, Kafka, Cassandra and Akka on Mesos for Real-Time Personalization
Using Spark, Kafka, Cassandra and Akka on Mesos for Real-Time PersonalizationPatrick Di Loreto
 
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...DataStax Academy
 
Cisco UCS Integrated Infrastructure for Big Data with Cassandra
Cisco UCS Integrated Infrastructure for Big Data with CassandraCisco UCS Integrated Infrastructure for Big Data with Cassandra
Cisco UCS Integrated Infrastructure for Big Data with CassandraDataStax Academy
 
The Matrix and DataStax
The Matrix and DataStaxThe Matrix and DataStax
The Matrix and DataStaxDataStax
 
Fully Fault tolerant Streaming Workflows at Scale using Apache Mesos & Spark ...
Fully Fault tolerant Streaming Workflows at Scale using Apache Mesos & Spark ...Fully Fault tolerant Streaming Workflows at Scale using Apache Mesos & Spark ...
Fully Fault tolerant Streaming Workflows at Scale using Apache Mesos & Spark ...Akhil Das
 
Cloud Computing Open Stack Compute Node
Cloud Computing Open Stack Compute NodeCloud Computing Open Stack Compute Node
Cloud Computing Open Stack Compute NodePalak Sood
 
Migrating from a Relational Database to Cassandra: Why, Where, When and How
Migrating from a Relational Database to Cassandra: Why, Where, When and HowMigrating from a Relational Database to Cassandra: Why, Where, When and How
Migrating from a Relational Database to Cassandra: Why, Where, When and HowAnant Corporation
 
Gwmep task manageras-a-service in apache cloud stack
Gwmep task manageras-a-service in apache cloud stackGwmep task manageras-a-service in apache cloud stack
Gwmep task manageras-a-service in apache cloud stackieeepondy
 
Kafka spark cassandra webinar feb 16 2016
Kafka spark cassandra   webinar feb 16 2016 Kafka spark cassandra   webinar feb 16 2016
Kafka spark cassandra webinar feb 16 2016 Hiromitsu Komatsu
 
Evaluating Apache Cassandra as a Cloud Database
Evaluating Apache Cassandra as a Cloud DatabaseEvaluating Apache Cassandra as a Cloud Database
Evaluating Apache Cassandra as a Cloud DatabaseDataStax
 

What's hot (20)

The myth of Cassandra
The myth of CassandraThe myth of Cassandra
The myth of Cassandra
 
Real-time personal trainer on the SMACK stack
Real-time personal trainer on the SMACK stackReal-time personal trainer on the SMACK stack
Real-time personal trainer on the SMACK stack
 
Apache Cassandra overview
Apache Cassandra overviewApache Cassandra overview
Apache Cassandra overview
 
An Introduction to Distributed Search with Datastax Enterprise Search
An Introduction to Distributed Search with Datastax Enterprise SearchAn Introduction to Distributed Search with Datastax Enterprise Search
An Introduction to Distributed Search with Datastax Enterprise Search
 
Pipedrive DW on AWS
Pipedrive DW on AWSPipedrive DW on AWS
Pipedrive DW on AWS
 
Using Spark, Kafka, Cassandra and Akka on Mesos for Real-Time Personalization
Using Spark, Kafka, Cassandra and Akka on Mesos for Real-Time PersonalizationUsing Spark, Kafka, Cassandra and Akka on Mesos for Real-Time Personalization
Using Spark, Kafka, Cassandra and Akka on Mesos for Real-Time Personalization
 
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
Typesafe & William Hill: Cassandra, Spark, and Kafka - The New Streaming Data...
 
Cisco UCS Integrated Infrastructure for Big Data with Cassandra
Cisco UCS Integrated Infrastructure for Big Data with CassandraCisco UCS Integrated Infrastructure for Big Data with Cassandra
Cisco UCS Integrated Infrastructure for Big Data with Cassandra
 
The Matrix and DataStax
The Matrix and DataStaxThe Matrix and DataStax
The Matrix and DataStax
 
Fully Fault tolerant Streaming Workflows at Scale using Apache Mesos & Spark ...
Fully Fault tolerant Streaming Workflows at Scale using Apache Mesos & Spark ...Fully Fault tolerant Streaming Workflows at Scale using Apache Mesos & Spark ...
Fully Fault tolerant Streaming Workflows at Scale using Apache Mesos & Spark ...
 
Cloud Computing Open Stack Compute Node
Cloud Computing Open Stack Compute NodeCloud Computing Open Stack Compute Node
Cloud Computing Open Stack Compute Node
 
Migrating from a Relational Database to Cassandra: Why, Where, When and How
Migrating from a Relational Database to Cassandra: Why, Where, When and HowMigrating from a Relational Database to Cassandra: Why, Where, When and How
Migrating from a Relational Database to Cassandra: Why, Where, When and How
 
Cassandra architecture
Cassandra architectureCassandra architecture
Cassandra architecture
 
Gwmep task manageras-a-service in apache cloud stack
Gwmep task manageras-a-service in apache cloud stackGwmep task manageras-a-service in apache cloud stack
Gwmep task manageras-a-service in apache cloud stack
 
Cassandra Architecture FTW
Cassandra Architecture FTWCassandra Architecture FTW
Cassandra Architecture FTW
 
Introduction to OpenStack (2012)
Introduction to OpenStack (2012)Introduction to OpenStack (2012)
Introduction to OpenStack (2012)
 
Cassandra ppt 2
Cassandra ppt 2Cassandra ppt 2
Cassandra ppt 2
 
Kafka spark cassandra webinar feb 16 2016
Kafka spark cassandra   webinar feb 16 2016 Kafka spark cassandra   webinar feb 16 2016
Kafka spark cassandra webinar feb 16 2016
 
Cassandra no sql ecosystem
Cassandra no sql ecosystemCassandra no sql ecosystem
Cassandra no sql ecosystem
 
Evaluating Apache Cassandra as a Cloud Database
Evaluating Apache Cassandra as a Cloud DatabaseEvaluating Apache Cassandra as a Cloud Database
Evaluating Apache Cassandra as a Cloud Database
 

Similar to Building High Scalable Distributed Framework on Apache Mesos

Mesos: Cluster Management System
Mesos: Cluster Management SystemMesos: Cluster Management System
Mesos: Cluster Management SystemErhan Bagdemir
 
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...Marcelo Sousa Ancelmo
 
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017Codemotion
 
Introduction to mesos
Introduction to mesosIntroduction to mesos
Introduction to mesosOmid Vahdaty
 
Layers and types of cloud
Layers and types of cloudLayers and types of cloud
Layers and types of cloudANUSUYA T K
 
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...Marcelo Sousa Ancelmo
 
Introduction to Apache Mesos
Introduction to Apache MesosIntroduction to Apache Mesos
Introduction to Apache MesosKnoldus Inc.
 
Cloud Computing Introduction.pptx
Cloud Computing Introduction.pptxCloud Computing Introduction.pptx
Cloud Computing Introduction.pptxITALIA JOSEPH MARIA
 
Microservices, Monoliths, SOA and How We Got Here
Microservices, Monoliths, SOA and How We Got HereMicroservices, Monoliths, SOA and How We Got Here
Microservices, Monoliths, SOA and How We Got HereLightbend
 
An operating system for multicore and clouds: mechanism and implementation
An operating system for multicore and clouds: mechanism and implementationAn operating system for multicore and clouds: mechanism and implementation
An operating system for multicore and clouds: mechanism and implementationMohanadarshan Vivekanandalingam
 
Net core microservice development made easy with azure dev spaces
Net core microservice development made easy with azure dev spacesNet core microservice development made easy with azure dev spaces
Net core microservice development made easy with azure dev spacesAlon Fliess
 

Similar to Building High Scalable Distributed Framework on Apache Mesos (20)

Modern distributed-systems
Modern distributed-systemsModern distributed-systems
Modern distributed-systems
 
Mesos: Cluster Management System
Mesos: Cluster Management SystemMesos: Cluster Management System
Mesos: Cluster Management System
 
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
 
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
Mario Cartia - SMACK is the new LAMP! - Codemotion Milan 2017
 
Apache Mesos
Apache MesosApache Mesos
Apache Mesos
 
Introduction to mesos
Introduction to mesosIntroduction to mesos
Introduction to mesos
 
Layers and types of cloud
Layers and types of cloudLayers and types of cloud
Layers and types of cloud
 
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
Containers, DevOps, Apache Mesos and Cloud - Reshaping how we develop and del...
 
Cassandra & Kubernetes
Cassandra & KubernetesCassandra & Kubernetes
Cassandra & Kubernetes
 
Apache mesos
Apache mesosApache mesos
Apache mesos
 
Mesos introduction
Mesos introductionMesos introduction
Mesos introduction
 
Introduction to Apache Mesos
Introduction to Apache MesosIntroduction to Apache Mesos
Introduction to Apache Mesos
 
Aws compute options
Aws compute optionsAws compute options
Aws compute options
 
Azure lessons
Azure lessonsAzure lessons
Azure lessons
 
Cloud Computing Introduction.pptx
Cloud Computing Introduction.pptxCloud Computing Introduction.pptx
Cloud Computing Introduction.pptx
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Microservices, Monoliths, SOA and How We Got Here
Microservices, Monoliths, SOA and How We Got HereMicroservices, Monoliths, SOA and How We Got Here
Microservices, Monoliths, SOA and How We Got Here
 
An operating system for multicore and clouds: mechanism and implementation
An operating system for multicore and clouds: mechanism and implementationAn operating system for multicore and clouds: mechanism and implementation
An operating system for multicore and clouds: mechanism and implementation
 
Net core microservice development made easy with azure dev spaces
Net core microservice development made easy with azure dev spacesNet core microservice development made easy with azure dev spaces
Net core microservice development made easy with azure dev spaces
 
Openstack
OpenstackOpenstack
Openstack
 

More from Rahul Kumar

Powering NLU Engine with Apache Spark to Communicate with the World
Powering NLU Engine with Apache Spark to Communicate with the WorldPowering NLU Engine with Apache Spark to Communicate with the World
Powering NLU Engine with Apache Spark to Communicate with the WorldRahul Kumar
 
Reactive app using actor model & apache spark
Reactive app using actor model & apache sparkReactive app using actor model & apache spark
Reactive app using actor model & apache sparkRahul Kumar
 
Reactive dashboard’s using apache spark
Reactive dashboard’s using apache sparkReactive dashboard’s using apache spark
Reactive dashboard’s using apache sparkRahul Kumar
 
Databricks spark-knowledge-base-1
Databricks spark-knowledge-base-1Databricks spark-knowledge-base-1
Databricks spark-knowledge-base-1Rahul Kumar
 
Composing and Scaling Data Platforms-2015
Composing and Scaling Data Platforms-2015Composing and Scaling Data Platforms-2015
Composing and Scaling Data Platforms-2015Rahul Kumar
 
ReactiveStream-meetup-Jan102015ppt
ReactiveStream-meetup-Jan102015pptReactiveStream-meetup-Jan102015ppt
ReactiveStream-meetup-Jan102015pptRahul Kumar
 

More from Rahul Kumar (6)

Powering NLU Engine with Apache Spark to Communicate with the World
Powering NLU Engine with Apache Spark to Communicate with the WorldPowering NLU Engine with Apache Spark to Communicate with the World
Powering NLU Engine with Apache Spark to Communicate with the World
 
Reactive app using actor model & apache spark
Reactive app using actor model & apache sparkReactive app using actor model & apache spark
Reactive app using actor model & apache spark
 
Reactive dashboard’s using apache spark
Reactive dashboard’s using apache sparkReactive dashboard’s using apache spark
Reactive dashboard’s using apache spark
 
Databricks spark-knowledge-base-1
Databricks spark-knowledge-base-1Databricks spark-knowledge-base-1
Databricks spark-knowledge-base-1
 
Composing and Scaling Data Platforms-2015
Composing and Scaling Data Platforms-2015Composing and Scaling Data Platforms-2015
Composing and Scaling Data Platforms-2015
 
ReactiveStream-meetup-Jan102015ppt
ReactiveStream-meetup-Jan102015pptReactiveStream-meetup-Jan102015ppt
ReactiveStream-meetup-Jan102015ppt
 

Building High Scalable Distributed Framework on Apache Mesos