[
https://issues.apache.org/jira/browse/MESOS-5359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15309115#comment-15309115
]
José Guilherme Vanz commented on MESOS-5359:
--------------------------------------------
I already have a preliminary patch. But before submitted it to review, I would
like to ask something related which is the best approach considering the Mesos
way to does stuff.
Right now, I added a {{flags}} member in the {{MesosProcess}}:
{code:title=src/scheduler/scherduler.ccp|borderStyle=solid}
MesosProcess(
const string& master,
ContentType _contentType,
const lambda::function<void()>& connected,
const lambda::function<void()>& disconnected,
const lambda::function<void(const queue<Event>&)>& received,
const Option<Credential>& _credential,
const Option<shared_ptr<MasterDetector>>& _detector,
const mesos::v1::scheduler::Flags& _flags)
: ProcessBase(ID::generate("scheduler")),
state(DISCONNECTED),
contentType(_contentType),
callbacks {connected, disconnected, received},
credential(_credential),
local(false),
flags(_flags)
{
....
Mesos::Mesos(
const string& master,
ContentType contentType,
const lambda::function<void()>& connected,
const lambda::function<void()>& disconnected,
const lambda::function<void(const queue<Event>&)>& received,
const Option<Credential>& credential,
const Option<shared_ptr<MasterDetector>>& detector,
const mesos::v1::scheduler::Flags& flags)
{
{code}
The {{mesos::v1::scheduler::Flags}} is the class created following the
{{src/sched/flags.hpp}} example. However, I'm not sure if pass the {{Flags}}
object is the best idea. I believe that the old api does that because the
scheduler driver, as an "internal" class, is responsable for that. The new API
{{Mesos}} class is the instanciated by the scheduler itself thereby I had to
add the {{mesos::v1::scheduler::Flags}} in the include dir, allowing scheduler
to instanciante the class. Is it ok? Should I pass just the flag value in the
{{Mesos}} constructor such as master connection url?
> The scheduler library should have a delay before initiating a connection with
> master.
> -------------------------------------------------------------------------------------
>
> Key: MESOS-5359
> URL: https://issues.apache.org/jira/browse/MESOS-5359
> Project: Mesos
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: Anand Mazumdar
> Assignee: José Guilherme Vanz
> Labels: mesosphere
>
> Currently, the scheduler library {{src/scheduler/scheduler.cpp}} does have an
> artificially induced delay when trying to initially establish a connection
> with the master. In the event of a master failover or ZK disconnect, a large
> number of frameworks can get disconnected and then thereby overwhelm the
> master with TCP SYN requests.
> On a large cluster with many agents, the master is already overwhelmed with
> handling connection requests from the agents. This compounds the issue
> further on the master.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)