[dancer-users] Multiple virtual hosts: one dancer instance or one per vhost?

WK wanradt at gmail.com
Wed Oct 7 15:39:28 BST 2015


Hi

2015-10-07 17:23 GMT+03:00 Tom Browder <tom.browder at gmail.com>:

> I am investigating moving several virtual host web sites (some using
> plain CGI and some purely static) to using dancer2 and wonder

As I see the topic:

>  (1) can
> one have one dancer process per vhost and

You _may_ run one process per vhost, but even with very low traffic
site it is better to run more than one worker.

I think the most common setup for Dancer app is to run it with some
Plack-capable server (like Starman) behind some reverse proxy (like
nginx).

https://metacpan.org/pod/Dancer::Deployment#Running-on-Perl-webservers-with-plackup

plackup -E deployment -s Starman --workers=10 -p 5001 -a bin/app.pl

You may choose suitable count of workers.

> (2) can one dancer process
> support multiple host?

It is possible for static pages, but then why to use Dancer at all?

When you need some dynamic features (like sessions), you are in trouble.


Wbr,
-- 
Kõike hääd,

Gunnar


More information about the dancer-users mailing list