You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/06/22 22:26:31 UTC

[1/2] mesos git commit: Updated agent to backoff before linking with the master.

Repository: mesos
Updated Branches:
  refs/heads/0.27.x 68dd1f6a1 -> 00401647f


Updated agent to backoff before linking with the master.

Currently the agent will immediately link with the master once
the master is discovered. The agent currently uses a registration
backoff in order to alleviate the failover load of the master for
large clusters. However, since the link occurs immediately, the
master still has to process a large influx of connections. This
can lead to connections closing and the agents not re-registering
due to MESOS-1963.

Performing the link after the initial backoff ensures that
the --registration_backoff flag alleviates a thundering herd
of TCP connections against the master.

Review: https://reviews.apache.org/r/47209/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a819815f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a819815f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a819815f

Branch: refs/heads/0.27.x
Commit: a819815f8409c88ec4ef96b37fa8635f9f8fcbd1
Parents: 68dd1f6
Author: David Robinson <dr...@twopensource.com>
Authored: Thu May 12 20:58:59 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Wed Jun 22 14:50:56 2016 -0700

----------------------------------------------------------------------
 src/slave/slave.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a819815f/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 1f4c836..6d9b4d0 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -793,7 +793,6 @@ void Slave::detected(const Future<Option<MasterInfo>>& _master)
     master = UPID(_master.get().get().pid());
 
     LOG(INFO) << "New master detected at " << master.get();
-    link(master.get());
 
     if (state == TERMINATING) {
       LOG(INFO) << "Skipping registration because slave is terminating";
@@ -857,6 +856,10 @@ void Slave::authenticate()
 
   LOG(INFO) << "Authenticating with master " << master.get();
 
+  // Ensure there is a link to the master before we start
+  // communicating with it.
+  link(master.get());
+
   CHECK(authenticatee == NULL);
 
   if (authenticateeName == DEFAULT_AUTHENTICATEE) {
@@ -1196,6 +1199,13 @@ void Slave::doReliableRegistration(Duration maxBackoff)
 
   CHECK_NE("cleanup", flags.recover);
 
+  // Ensure there is a link to the master before we start
+  // communicating with it. We want to link after the initial
+  // registration backoff in order to avoid all of the agents
+  // establishing connections with the master at once.
+  // See MESOS-5330.
+  link(master.get());
+
   if (!info.has_id()) {
     // Registering for the first time.
     RegisterSlaveMessage message;


[2/2] mesos git commit: Cherry-pick of MESOS-5330 to 0.27.x.

Posted by bm...@apache.org.
Cherry-pick of MESOS-5330 to 0.27.x.

This was a scalability improvement to make agents backoff before
establishing connections to the master.

Review: https://reviews.apache.org/r/49108


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/00401647
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/00401647
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/00401647

Branch: refs/heads/0.27.x
Commit: 00401647fc93d853d1b3daa16d464fe5474d47bc
Parents: a819815
Author: Benjamin Mahler <bm...@apache.org>
Authored: Wed Jun 22 14:30:40 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Wed Jun 22 14:50:57 2016 -0700

----------------------------------------------------------------------
 CHANGELOG | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/00401647/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 897f397..ae919ea 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,12 @@
+Release Notes - Mesos - Version 0.27.4
+--------------------------------------
+* This is a bug fix release.
+
+All Issues:
+** Bug
+  * [MESOS-5330] - Agent should backoff before connecting to the master.
+
+
 Release Notes - Mesos - Version 0.27.3
 --------------------------------------
 * This is a bug fix release.