Return-Path: X-Original-To: apmail-incubator-mesos-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-mesos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 634FA1001F for ; Sat, 20 Apr 2013 19:01:03 +0000 (UTC) Received: (qmail 14443 invoked by uid 500); 20 Apr 2013 19:01:03 -0000 Delivered-To: apmail-incubator-mesos-dev-archive@incubator.apache.org Received: (qmail 14421 invoked by uid 500); 20 Apr 2013 19:01:03 -0000 Mailing-List: contact mesos-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mesos-dev@incubator.apache.org Delivered-To: mailing list mesos-dev@incubator.apache.org Received: (qmail 14406 invoked by uid 99); 20 Apr 2013 19:01:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Apr 2013 19:01:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dchalloner@gmail.com designates 209.85.220.182 as permitted sender) Received: from [209.85.220.182] (HELO mail-vc0-f182.google.com) (209.85.220.182) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Apr 2013 19:00:57 +0000 Received: by mail-vc0-f182.google.com with SMTP id ht11so2761058vcb.13 for ; Sat, 20 Apr 2013 12:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=8aTmOfAql3D7SA5tqfRFPVLMM4weQ8Lmrzi6qqBQfCE=; b=Z9XgYlm/jHq3Cs48Ion68h0fJrEuTSau8gh2tmHwBl/S1Xn0QYwlvfXIeWadpsvfXl wJGIcjImHQklSrmjNiQS3N2s1/+RksrPGz+lmC2TI8BmOA6KYcN/jb4ANG+Cr0maxF85 T2VcM5T2gHB1x//i8qYQawuHsfeK2v5iPrZ9rZCAO22Kueb3aQgRv8Gntzx+g7I57vw7 nUFbw4zpRfhLZi7TXW659eLjewn1y8421WnWVzTV3jEI+6NVeHzg++lEGSamt4uco8jE uLP00UAO8gzW53p/YpsSHFcG1tBI7JcLyXcuqz/eCNbQ4+Eiqa814FgI9TYobvoRR/LU b5VQ== MIME-Version: 1.0 X-Received: by 10.221.4.131 with SMTP id oc3mr15118345vcb.46.1366484437216; Sat, 20 Apr 2013 12:00:37 -0700 (PDT) Received: by 10.220.205.130 with HTTP; Sat, 20 Apr 2013 12:00:37 -0700 (PDT) Date: Sat, 20 Apr 2013 12:00:37 -0700 Message-ID: Subject: Best way to go about writing a framework for daemon-like tasks From: David Challoner To: mesos-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=089e01293fe278bcc904dacf7345 X-Virus-Checked: Checked by ClamAV on apache.org --089e01293fe278bcc904dacf7345 Content-Type: text/plain; charset=ISO-8859-1 Hi, new to mesos. I setup a test cluster in EC2 (which required some tweaks to the provided scripts - i'll try to send those back in) but I'm not sure how I should write the framework for what I'd like to achieve. I'd like to use Mesos to run a dynamically changing list of applications like so: [ { job: app, cpu: 3, memory: 20g, instances: 4}, { job: app2, cpu: 5, memory: 30g, instances: 2} ] So I want the framework to pull the list out of a database/redis/zk and run these apps across the cluster in a round robbin fashion until either the cluster resources are exhausted or we've satisfied the number of running instances. What I'm having trouble groking is how this would look on a framework/executor level. With a single framework it seems you're likely to fail using all available resources given a long running daemon-like tasks: *framework registered *node offers 10 cpus *framework accepts offer and at the time decides to to gives it 8cpu worth of tasks to run. *node has 2 cpus left over *at some point the list of apps changes and a new app allocation is needed.. Maybe we have a new app that could use those 2 cpus or maybe we just need to adjust how many of the old apps are running. If I understand the docs correctly, the nodes won't re-offer because they've already been assigned tasks by the framework that will run forever. Do I maybe submit a new framework for each app type then? Would that scale to large numbers of apps? --089e01293fe278bcc904dacf7345--