SlideShare a Scribd company logo
1 of 22
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

What's hot (7)

Beginning with Windows Azure
Beginning with Windows AzureBeginning with Windows Azure
Beginning with Windows Azure
 
CMP, Containers Orchestrator, PaaS landscape explained in one slide
CMP, Containers Orchestrator, PaaS landscape explained in one slideCMP, Containers Orchestrator, PaaS landscape explained in one slide
CMP, Containers Orchestrator, PaaS landscape explained in one slide
 
Cloud Patterns And Applications
Cloud Patterns And ApplicationsCloud Patterns And Applications
Cloud Patterns And Applications
 
Ms azure
Ms azure Ms azure
Ms azure
 
Cluster computings
Cluster computingsCluster computings
Cluster computings
 
Swiper exploiting virtual machine vulnerability in third party clouds with co...
Swiper exploiting virtual machine vulnerability in third party clouds with co...Swiper exploiting virtual machine vulnerability in third party clouds with co...
Swiper exploiting virtual machine vulnerability in third party clouds with co...
 
Aws
AwsAws
Aws
 

Viewers also liked

Viewers also liked (20)

Equation solving-at-scale-using-apache-spark
Equation solving-at-scale-using-apache-sparkEquation solving-at-scale-using-apache-spark
Equation solving-at-scale-using-apache-spark
 
Graph computation
Graph computationGraph computation
Graph computation
 
WEBSOCKETS AND WEBWORKERS
WEBSOCKETS AND WEBWORKERSWEBSOCKETS AND WEBWORKERS
WEBSOCKETS AND WEBWORKERS
 
Angular js performance improvements
Angular js performance improvementsAngular js performance improvements
Angular js performance improvements
 
Real-time Supply Chain Analytics
Real-time Supply Chain AnalyticsReal-time Supply Chain Analytics
Real-time Supply Chain Analytics
 
Failsafe Hadoop Infrastructure and the way they work
Failsafe Hadoop Infrastructure and the way they workFailsafe Hadoop Infrastructure and the way they work
Failsafe Hadoop Infrastructure and the way they work
 
Productionizing spark
Productionizing sparkProductionizing spark
Productionizing spark
 
Spark and spark streaming internals
Spark and spark streaming internalsSpark and spark streaming internals
Spark and spark streaming internals
 
Sparkstreaming with kafka and h base at scale (1)
Sparkstreaming with kafka and h base at scale (1)Sparkstreaming with kafka and h base at scale (1)
Sparkstreaming with kafka and h base at scale (1)
 
Composing and scaling data platforms
Composing and scaling data platformsComposing and scaling data platforms
Composing and scaling data platforms
 
Introduction to apache nutch
Introduction to apache nutchIntroduction to apache nutch
Introduction to apache nutch
 
Approaches to text analysis
Approaches to text analysisApproaches to text analysis
Approaches to text analysis
 
Introduction to Spark R with R studio - Mr. Pragith
Introduction to Spark R with R studio - Mr. Pragith Introduction to Spark R with R studio - Mr. Pragith
Introduction to Spark R with R studio - Mr. Pragith
 
Tale of Kafka Consumer for Spark Streaming
Tale of Kafka Consumer for Spark StreamingTale of Kafka Consumer for Spark Streaming
Tale of Kafka Consumer for Spark Streaming
 
Joining Large data at Scale
Joining Large data at ScaleJoining Large data at Scale
Joining Large data at Scale
 
Building bots to automate common developer tasks - Writing your first smart c...
Building bots to automate common developer tasks - Writing your first smart c...Building bots to automate common developer tasks - Writing your first smart c...
Building bots to automate common developer tasks - Writing your first smart c...
 
Graph Analytics for big data
Graph Analytics for big dataGraph Analytics for big data
Graph Analytics for big data
 
Time series database by Harshil Ambagade
Time series database by Harshil AmbagadeTime series database by Harshil Ambagade
Time series database by Harshil Ambagade
 
Using spark for timeseries graph analytics
Using spark for timeseries graph analyticsUsing spark for timeseries graph analytics
Using spark for timeseries graph analytics
 
SORT & JOIN IN SPARK 2.0
SORT & JOIN IN SPARK 2.0SORT & JOIN IN SPARK 2.0
SORT & JOIN IN SPARK 2.0
 

Similar to Building high scalable distributed framework on apache mesos

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
Mohanadarshan Vivekanandalingam
 

Similar to Building high scalable distributed framework on apache mesos (20)

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
 
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...
 
Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos Fully fault tolerant real time data pipeline with docker and mesos
Fully fault tolerant real time data pipeline with docker and mesos
 
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
 
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
 
OpenStack or CloudStack
OpenStack or CloudStackOpenStack or CloudStack
OpenStack or CloudStack
 
Enterprise Cloud Glossary from Ubuntu
Enterprise Cloud Glossary from UbuntuEnterprise Cloud Glossary from Ubuntu
Enterprise Cloud Glossary from Ubuntu
 

More from Sigmoid

Real-Time Stock Market Analysis using Spark Streaming
 Real-Time Stock Market Analysis using Spark Streaming Real-Time Stock Market Analysis using Spark Streaming
Real-Time Stock Market Analysis using Spark Streaming
Sigmoid
 

More from Sigmoid (10)

Monitoring and tuning Spark applications
Monitoring and tuning Spark applicationsMonitoring and tuning Spark applications
Monitoring and tuning Spark applications
 
Structured Streaming Using Spark 2.1
Structured Streaming Using Spark 2.1Structured Streaming Using Spark 2.1
Structured Streaming Using Spark 2.1
 
Real-Time Stock Market Analysis using Spark Streaming
 Real-Time Stock Market Analysis using Spark Streaming Real-Time Stock Market Analysis using Spark Streaming
Real-Time Stock Market Analysis using Spark Streaming
 
Levelling up in Akka
Levelling up in AkkaLevelling up in Akka
Levelling up in Akka
 
Expression Problem: Discussing the problems in OOPs language & their solutions
Expression Problem: Discussing the problems in OOPs language & their solutionsExpression Problem: Discussing the problems in OOPs language & their solutions
Expression Problem: Discussing the problems in OOPs language & their solutions
 
Spark 1.6 vs Spark 2.0
Spark 1.6 vs Spark 2.0Spark 1.6 vs Spark 2.0
Spark 1.6 vs Spark 2.0
 
ML on Big Data: Real-Time Analysis on Time Series
ML on Big Data: Real-Time Analysis on Time SeriesML on Big Data: Real-Time Analysis on Time Series
ML on Big Data: Real-Time Analysis on Time Series
 
Dashboard design By Anu Vijayan
Dashboard design By Anu VijayanDashboard design By Anu Vijayan
Dashboard design By Anu Vijayan
 
Spark Dataframe - Mr. Jyotiska
Spark Dataframe - Mr. JyotiskaSpark Dataframe - Mr. Jyotiska
Spark Dataframe - Mr. Jyotiska
 
Real Time search using Spark and Elasticsearch
Real Time search using Spark and ElasticsearchReal Time search using Spark and Elasticsearch
Real Time search using Spark and Elasticsearch
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Building high scalable distributed framework on apache mesos