2

I have multiple Catalyst applications running as FCGI.

Is there a benefit in consolidating them into a single one with multiple constrollers?

Thanks,

Simone

simone
  • 4,667
  • 4
  • 25
  • 47
  • If the applications only have one controller you should think of using something more lightweight. I like to split up thigs that do not belong together so i recommend to keep it that way. What benefits are you looking for anyway? Performance, usibility, maintainability? – matthias krull Mar 25 '11 at 08:29
  • maintainability is my main concern. the applications all do something completely different, and it's easier to keep them separate – simone Mar 26 '11 at 20:40

1 Answers1

2

RAM, probably? I think the minimum each server is going to hold onto is about 15MB so you might be able to save something like 100MB if you’re running 3 apps with with 3 servers. But that’s pure back of the napkin speculation.

Another option, which would likely achieve most of the same savings would be to move to Plack deployment. E.g., the same three apps, without consolidation, deployed on the same server (this is untested but seems right)–

# file: mutli-app.psgi
use Plack::Builder;

use YourApp;
use OurApp;
use MyApp;

MyApp->setup_engine('PSGI');
my $mine = sub { MyApp->run(@_) };

YourApp->setup_engine('PSGI');
my $your = sub { YourApp->run(@_) };

OurApp->setup_engine('PSGI');
my $our = sub { OurApp->run(@_) };

builder {
    mount "/mine" => builder {
        enable "Plack::Middleware::Foo";
        $mine;
    };
    mount "/secondperson" => $your;
    mount "/shared" => $our;

};

And then run it with–

plackup multi-app.psgi
Ashley
  • 4,307
  • 2
  • 19
  • 28