Am 18.09.2016 um 06:43 schrieb Uiy Uiy:
does vibe.d support load balancing and or virtual hosts? tried vibedist but no luck! Vibe.D seems like a pretty good attempt at a web server but seems to have lost support from the dev ;/
Virtual hosts are supported by setting the HTTPServerSettings.hostName
field accordingly. It is possible to call listenHTTP
multiple times
with the same IP/port, but with different host names.
There is also support for a simple form of multi-thread based load
balancing by setting HTTPServerOption.distribute
. However, it
circumvents D's shared
qualifier, so that the user is fully
responsible for ensuring thread safety. For this reason, I'd generally
not recommend this, but instead use multi-process load balancing on a
single machine (letting multiple processes listen on the same port).
For multi-machine load-balancing, vibedist was planned, but it isn't
there yet. However, any off-the-shelf load-balancing solution should
work with vibe.d just like with other web servers - the main difference
is that manual configuration is required.
BTW, I'm currently still busy with other things, but development will be
back to full speed shortly! Considerable resources also went into
diet-ng and vibe-core (which is a revamped version of the vibe.core
module and will be the basis for all further developments),
which slowed down the pace for the main repository somewhat.