SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
M E S O S H T T P A P I
@ v i n o d k o n e
@ i j i m e n e
Mesos 1.0 IS COMING
M E S O S A P I S
S c h e d u l e r M a s t e r S l a v e E x e c u t o r
Scheduler API Executor API
Internal API
Operator API
D E P E N D E N C E O N N A T I V E L I B R A RY
S c h e d u l e r
M a s t e rJ a v a
L i b r a r y
N a t i v e
L i b r a r y
mesos.jar libmesos.so
Hard to debug
Not portable
N O N - S TA N D A R D F R A M E W O R K A P I
POST /master/mesos.internal.LaunchTasksMessage HTTP/1.1
User-Agent: libprocess/scheduler-1234-23-23342@127.0.0.1:8081
Libprocess-From: scheduler-1234-23-23342@127.0.0.1:8081
Connection: Keep-Alive
Host:
Transfer-Encoding: chunked
N E T W O R K I N G C O N S T R A I N T S
S c h e d u l e r M a s t e r
Firewall
Containers :( Network partitions :(
L A C K O F A P I V E R S I O N I N G
GET /metrics/snapshot
Version
GET /state.json “version” : 0.23.0
JSON
P I TA F O R M E S O S D E V S
Lot of boiler plate to add new calls/events
Forced upgrade dependencies
– H A R V E Y D E N T
“You either die a hero…
or live long enough to see yourself become the villain”
replaced by a better API
1 . 0 G O A L S
Consistent APIs
Versioning
N E W H T T P A P I
• Standard HTTP 1.1
• Versioned !
• Well documented
N E W M E S O S A P I S
Endpoint API Hosted by
/api/v1/scheduler Scheduler API Master
/api/v1/executor Executor API Slave
/api/v1/internal Internal API Master
/api/v1/admin Operator API Master / Slave
S C H E D U L E R H T T P A P I
• Based on Calls and Events
• Scheduler opens connections to the master
• A persistent connection to receive events
• One (or more) connection(s) to send calls
R A T I O N A L E
Simplicity
Off-the-shelf HTTP client libraries
No native dependencies
R A T I O N A L E
Upgradability
Familiar to existing APIs
killTask() Call.Kill
R A T I O N A L E
Extensibility
Easy to add support for new features
C A L L S Old API
S U B S C R I B E start()
T E A R D O W N stop()
A C C E P T acceptOffers()
D E C L I N E declineOffer()
R E V I V E reviveOffers()
K I L L killTask()
S H U T D O W N * Shutdown executor *
A C K N O W L E D G E acknowledgeStatusUpdate()
R E C O N C I L E reconcileTasks()
M E S S A G E sendFrameworkMessage()
R E Q U E S T requestResources()
E V E N T S Old API
S U B S C R I B E D registered() / reregistered()
O F F E R S resourceOffers()
R E S C I N D offerRescinded()
U P D AT E statusUpdate()
M E S S A G E frameworkMessage()
FA I L U R E slaveLost() / executorLost()
E R R O R error()
H E A R T B E AT * Periodic heartbeats *
P R O T O C O L
• Every call is a HTTP POST request
• application/json or application/x-protobuf
• SUBSCRIBE call results in a “200 OK” streaming response
• Record-IO formatted events
• chunked encoding
• All successful non-SUBSCRIBE calls result in “202 Accepted”
S U B S C R I P T I O N R E Q U E S T
POST /api/v1/scheduler HTTP/1.1
Host: masterhost:5050
Content-Type: application/json
Accept: application/json
Connection: close
{
“type” : “SUBSCRIBE”,
“subscribe” : {
“framework_info” : {
“user” : “foo”,
“name” : “Example HTTP Framework”
},
“force” : true
}
}
S U B S C R I P T I O N R E S P O N S E
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
<Event Length>
{
“type” : “SUBSCRIBED”,
“subscribed” : {
“framework_id” : {“value”:“12220-3440-12532-2345”},
“heartbeat_interval_seconds” : 15
}
}
<more events>
K I L L
POST /api/v1/scheduler HTTP/1.1
Host: masterhost:5050
Content-Type: application/son
Accept: application/json
Connection: close
{
“framework_id” : {“value” : “12220-3440-12532-2345”},
“type” : “KILL”,
“kill” : {
“task_id” : {“value” : “12220-3440-12532-my-task”},
“slave_id” : {“value” : “12220-3440-12532-S123345”}
}
}
Response: HTTP/1.1 202 Accepted
D I S C O N N E C T I O N S & PA R T I T I O N S
• Master tracks the persistent subscription connection
• Reconnect within failover timeout
• Subscribe.force : Failover
• Periodic HEARTBEATs sent by master
V E R S I O N I N G
Explicit Simple
Avoid version explosion
/api/v1/scheduler
/api/v1/executor
/api/v1/admin
/api/v1/internal
A P I V E R S I O N V S R E L E A S E V E R S I O N
• API version == Major release version
• v1 API supported by 1.0.0, 1.4.0, 1.20.0
• vN API released in N-1 release version
• vN API considered stable in the last N-1 release
• Version bumping
• Major/API version bumped for backwards incompatible changes (> yearly)
• Minor version bumped regularly (4-8 weeks)
R O A D T O 1 . 0
v1 scheduler API
v1 executor API
0.24.0
0.25.0
v1 operator API
1.0
v1 internal API
D E M O
R A T I O N A L E
Simplicity
R A T I O N A L E
Simplicity
Upgradability
R A T I O N A L E
Simplicity
Upgradability
Extensibility
A C K N O W L E D G E M E N T S
T H A N K Y O U
MESOS-2288

Contenu connexe

Plus de Mesosphere Inc.

DevOps in Age of Kubernetes
DevOps in Age of KubernetesDevOps in Age of Kubernetes
DevOps in Age of KubernetesMesosphere Inc.
 
Java EE Modernization with Mesosphere DCOS
Java EE Modernization with Mesosphere DCOSJava EE Modernization with Mesosphere DCOS
Java EE Modernization with Mesosphere DCOSMesosphere Inc.
 
Operating Kubernetes at Scale (Australia Presentation)
Operating Kubernetes at Scale (Australia Presentation)Operating Kubernetes at Scale (Australia Presentation)
Operating Kubernetes at Scale (Australia Presentation)Mesosphere Inc.
 
Episode 4: Operating Kubernetes at Scale with DC/OS
Episode 4: Operating Kubernetes at Scale with DC/OSEpisode 4: Operating Kubernetes at Scale with DC/OS
Episode 4: Operating Kubernetes at Scale with DC/OSMesosphere Inc.
 
Episode 3: Kubernetes and Big Data Services
Episode 3: Kubernetes and Big Data ServicesEpisode 3: Kubernetes and Big Data Services
Episode 3: Kubernetes and Big Data ServicesMesosphere Inc.
 
Episode 2: Deploying Kubernetes at Scale
Episode 2: Deploying Kubernetes at ScaleEpisode 2: Deploying Kubernetes at Scale
Episode 2: Deploying Kubernetes at ScaleMesosphere Inc.
 
Episode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-ServiceEpisode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-ServiceMesosphere Inc.
 
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...Mesosphere Inc.
 
Webinar: What's New in DC/OS 1.11
Webinar: What's New in DC/OS 1.11Webinar: What's New in DC/OS 1.11
Webinar: What's New in DC/OS 1.11Mesosphere Inc.
 
Webinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSWebinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSMesosphere Inc.
 
Webinar: Operating Kubernetes at Scale
Webinar: Operating Kubernetes at ScaleWebinar: Operating Kubernetes at Scale
Webinar: Operating Kubernetes at ScaleMesosphere Inc.
 
Webinar: Déployez facilement Kubernetes & vos containers
Webinar: Déployez facilement Kubernetes & vos containersWebinar: Déployez facilement Kubernetes & vos containers
Webinar: Déployez facilement Kubernetes & vos containersMesosphere Inc.
 
Webinar: Deep Learning Pipelines Beyond the Learning
Webinar: Deep Learning Pipelines Beyond the LearningWebinar: Deep Learning Pipelines Beyond the Learning
Webinar: Deep Learning Pipelines Beyond the LearningMesosphere Inc.
 
Running Distributed TensorFlow with GPUs on Mesos with DC/OS
Running Distributed TensorFlow with GPUs on Mesos with DC/OS Running Distributed TensorFlow with GPUs on Mesos with DC/OS
Running Distributed TensorFlow with GPUs on Mesos with DC/OS Mesosphere Inc.
 
Manage Microservices & Fast Data Systems on One Platform w/ DC/OS
Manage Microservices & Fast Data Systems on One Platform w/ DC/OSManage Microservices & Fast Data Systems on One Platform w/ DC/OS
Manage Microservices & Fast Data Systems on One Platform w/ DC/OSMesosphere Inc.
 
Jolt: Distributed, fault-tolerant test running at scale using Mesos
Jolt: Distributed, fault-tolerant test running at scale using MesosJolt: Distributed, fault-tolerant test running at scale using Mesos
Jolt: Distributed, fault-tolerant test running at scale using MesosMesosphere Inc.
 
Deploying Kong with Mesosphere DC/OS
Deploying Kong with Mesosphere DC/OSDeploying Kong with Mesosphere DC/OS
Deploying Kong with Mesosphere DC/OSMesosphere Inc.
 
Tech Preview: Kubernetes on Mesosphere DC/OS 1.10
Tech Preview: Kubernetes on Mesosphere DC/OS 1.10Tech Preview: Kubernetes on Mesosphere DC/OS 1.10
Tech Preview: Kubernetes on Mesosphere DC/OS 1.10Mesosphere Inc.
 
Discover the all new Mesosphere DC/OS 1.10
Discover the all new Mesosphere DC/OS 1.10Discover the all new Mesosphere DC/OS 1.10
Discover the all new Mesosphere DC/OS 1.10Mesosphere Inc.
 
Growing the Mesos Ecosystem
Growing the Mesos EcosystemGrowing the Mesos Ecosystem
Growing the Mesos EcosystemMesosphere Inc.
 

Plus de Mesosphere Inc. (20)

DevOps in Age of Kubernetes
DevOps in Age of KubernetesDevOps in Age of Kubernetes
DevOps in Age of Kubernetes
 
Java EE Modernization with Mesosphere DCOS
Java EE Modernization with Mesosphere DCOSJava EE Modernization with Mesosphere DCOS
Java EE Modernization with Mesosphere DCOS
 
Operating Kubernetes at Scale (Australia Presentation)
Operating Kubernetes at Scale (Australia Presentation)Operating Kubernetes at Scale (Australia Presentation)
Operating Kubernetes at Scale (Australia Presentation)
 
Episode 4: Operating Kubernetes at Scale with DC/OS
Episode 4: Operating Kubernetes at Scale with DC/OSEpisode 4: Operating Kubernetes at Scale with DC/OS
Episode 4: Operating Kubernetes at Scale with DC/OS
 
Episode 3: Kubernetes and Big Data Services
Episode 3: Kubernetes and Big Data ServicesEpisode 3: Kubernetes and Big Data Services
Episode 3: Kubernetes and Big Data Services
 
Episode 2: Deploying Kubernetes at Scale
Episode 2: Deploying Kubernetes at ScaleEpisode 2: Deploying Kubernetes at Scale
Episode 2: Deploying Kubernetes at Scale
 
Episode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-ServiceEpisode 1: Building Kubernetes-as-a-Service
Episode 1: Building Kubernetes-as-a-Service
 
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
Best Practices for Managing Kubernetes and Stateful Services: Mesosphere & Sy...
 
Webinar: What's New in DC/OS 1.11
Webinar: What's New in DC/OS 1.11Webinar: What's New in DC/OS 1.11
Webinar: What's New in DC/OS 1.11
 
Webinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OSWebinar: End-to-End CI/CD with GitLab and DC/OS
Webinar: End-to-End CI/CD with GitLab and DC/OS
 
Webinar: Operating Kubernetes at Scale
Webinar: Operating Kubernetes at ScaleWebinar: Operating Kubernetes at Scale
Webinar: Operating Kubernetes at Scale
 
Webinar: Déployez facilement Kubernetes & vos containers
Webinar: Déployez facilement Kubernetes & vos containersWebinar: Déployez facilement Kubernetes & vos containers
Webinar: Déployez facilement Kubernetes & vos containers
 
Webinar: Deep Learning Pipelines Beyond the Learning
Webinar: Deep Learning Pipelines Beyond the LearningWebinar: Deep Learning Pipelines Beyond the Learning
Webinar: Deep Learning Pipelines Beyond the Learning
 
Running Distributed TensorFlow with GPUs on Mesos with DC/OS
Running Distributed TensorFlow with GPUs on Mesos with DC/OS Running Distributed TensorFlow with GPUs on Mesos with DC/OS
Running Distributed TensorFlow with GPUs on Mesos with DC/OS
 
Manage Microservices & Fast Data Systems on One Platform w/ DC/OS
Manage Microservices & Fast Data Systems on One Platform w/ DC/OSManage Microservices & Fast Data Systems on One Platform w/ DC/OS
Manage Microservices & Fast Data Systems on One Platform w/ DC/OS
 
Jolt: Distributed, fault-tolerant test running at scale using Mesos
Jolt: Distributed, fault-tolerant test running at scale using MesosJolt: Distributed, fault-tolerant test running at scale using Mesos
Jolt: Distributed, fault-tolerant test running at scale using Mesos
 
Deploying Kong with Mesosphere DC/OS
Deploying Kong with Mesosphere DC/OSDeploying Kong with Mesosphere DC/OS
Deploying Kong with Mesosphere DC/OS
 
Tech Preview: Kubernetes on Mesosphere DC/OS 1.10
Tech Preview: Kubernetes on Mesosphere DC/OS 1.10Tech Preview: Kubernetes on Mesosphere DC/OS 1.10
Tech Preview: Kubernetes on Mesosphere DC/OS 1.10
 
Discover the all new Mesosphere DC/OS 1.10
Discover the all new Mesosphere DC/OS 1.10Discover the all new Mesosphere DC/OS 1.10
Discover the all new Mesosphere DC/OS 1.10
 
Growing the Mesos Ecosystem
Growing the Mesos EcosystemGrowing the Mesos Ecosystem
Growing the Mesos Ecosystem
 

Dernier

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
"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 ...Zilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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 Processorsdebabhi2
 
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...Martijn de Jong
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+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...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
"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 ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
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...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Mesos HTTP API

  • 1. M E S O S H T T P A P I @ v i n o d k o n e @ i j i m e n e
  • 2. Mesos 1.0 IS COMING
  • 3. M E S O S A P I S S c h e d u l e r M a s t e r S l a v e E x e c u t o r Scheduler API Executor API Internal API Operator API
  • 4.
  • 5. D E P E N D E N C E O N N A T I V E L I B R A RY S c h e d u l e r M a s t e rJ a v a L i b r a r y N a t i v e L i b r a r y mesos.jar libmesos.so Hard to debug Not portable
  • 6. N O N - S TA N D A R D F R A M E W O R K A P I POST /master/mesos.internal.LaunchTasksMessage HTTP/1.1 User-Agent: libprocess/scheduler-1234-23-23342@127.0.0.1:8081 Libprocess-From: scheduler-1234-23-23342@127.0.0.1:8081 Connection: Keep-Alive Host: Transfer-Encoding: chunked
  • 7. N E T W O R K I N G C O N S T R A I N T S S c h e d u l e r M a s t e r Firewall Containers :( Network partitions :(
  • 8. L A C K O F A P I V E R S I O N I N G GET /metrics/snapshot Version GET /state.json “version” : 0.23.0 JSON
  • 9. P I TA F O R M E S O S D E V S Lot of boiler plate to add new calls/events Forced upgrade dependencies
  • 10. – H A R V E Y D E N T “You either die a hero… or live long enough to see yourself become the villain” replaced by a better API
  • 11. 1 . 0 G O A L S Consistent APIs Versioning
  • 12. N E W H T T P A P I • Standard HTTP 1.1 • Versioned ! • Well documented
  • 13. N E W M E S O S A P I S Endpoint API Hosted by /api/v1/scheduler Scheduler API Master /api/v1/executor Executor API Slave /api/v1/internal Internal API Master /api/v1/admin Operator API Master / Slave
  • 14. S C H E D U L E R H T T P A P I • Based on Calls and Events • Scheduler opens connections to the master • A persistent connection to receive events • One (or more) connection(s) to send calls
  • 15. R A T I O N A L E Simplicity Off-the-shelf HTTP client libraries No native dependencies
  • 16. R A T I O N A L E Upgradability Familiar to existing APIs killTask() Call.Kill
  • 17. R A T I O N A L E Extensibility Easy to add support for new features
  • 18. C A L L S Old API S U B S C R I B E start() T E A R D O W N stop() A C C E P T acceptOffers() D E C L I N E declineOffer() R E V I V E reviveOffers() K I L L killTask() S H U T D O W N * Shutdown executor * A C K N O W L E D G E acknowledgeStatusUpdate() R E C O N C I L E reconcileTasks() M E S S A G E sendFrameworkMessage() R E Q U E S T requestResources()
  • 19. E V E N T S Old API S U B S C R I B E D registered() / reregistered() O F F E R S resourceOffers() R E S C I N D offerRescinded() U P D AT E statusUpdate() M E S S A G E frameworkMessage() FA I L U R E slaveLost() / executorLost() E R R O R error() H E A R T B E AT * Periodic heartbeats *
  • 20. P R O T O C O L • Every call is a HTTP POST request • application/json or application/x-protobuf • SUBSCRIBE call results in a “200 OK” streaming response • Record-IO formatted events • chunked encoding • All successful non-SUBSCRIBE calls result in “202 Accepted”
  • 21. S U B S C R I P T I O N R E Q U E S T POST /api/v1/scheduler HTTP/1.1 Host: masterhost:5050 Content-Type: application/json Accept: application/json Connection: close { “type” : “SUBSCRIBE”, “subscribe” : { “framework_info” : { “user” : “foo”, “name” : “Example HTTP Framework” }, “force” : true } }
  • 22. S U B S C R I P T I O N R E S P O N S E HTTP/1.1 200 OK Content-Type: application/json Transfer-Encoding: chunked <Event Length> { “type” : “SUBSCRIBED”, “subscribed” : { “framework_id” : {“value”:“12220-3440-12532-2345”}, “heartbeat_interval_seconds” : 15 } } <more events>
  • 23. K I L L POST /api/v1/scheduler HTTP/1.1 Host: masterhost:5050 Content-Type: application/son Accept: application/json Connection: close { “framework_id” : {“value” : “12220-3440-12532-2345”}, “type” : “KILL”, “kill” : { “task_id” : {“value” : “12220-3440-12532-my-task”}, “slave_id” : {“value” : “12220-3440-12532-S123345”} } } Response: HTTP/1.1 202 Accepted
  • 24. D I S C O N N E C T I O N S & PA R T I T I O N S • Master tracks the persistent subscription connection • Reconnect within failover timeout • Subscribe.force : Failover • Periodic HEARTBEATs sent by master
  • 25. V E R S I O N I N G Explicit Simple Avoid version explosion /api/v1/scheduler /api/v1/executor /api/v1/admin /api/v1/internal
  • 26. A P I V E R S I O N V S R E L E A S E V E R S I O N • API version == Major release version • v1 API supported by 1.0.0, 1.4.0, 1.20.0 • vN API released in N-1 release version • vN API considered stable in the last N-1 release • Version bumping • Major/API version bumped for backwards incompatible changes (> yearly) • Minor version bumped regularly (4-8 weeks)
  • 27. R O A D T O 1 . 0 v1 scheduler API v1 executor API 0.24.0 0.25.0 v1 operator API 1.0 v1 internal API
  • 28. D E M O
  • 29.
  • 30. R A T I O N A L E Simplicity
  • 31. R A T I O N A L E Simplicity Upgradability
  • 32. R A T I O N A L E Simplicity Upgradability Extensibility
  • 33. A C K N O W L E D G E M E N T S
  • 34. T H A N K Y O U MESOS-2288