Hi Jakov,
On Mon, Apr 04, 2011 at 11:50:09PM +0200, Jakov Sosic wrote:
> Hi.
>
> Is it possible to somehow force haproxy to forward request to a specific
> backend?
>
> For example I have two backends, and if I want to make some tests only
> on the first backend, how to force haproxy not to load balance those
> requests but to forward it to a specific host?
>
> Is it possible?
Not easily yet, you need the "use-server" statement which is not yet
implemented and that everyone is asking for.
Alternatively, if you just have a few servers, you can proceed like this :
frontend XXX
acl acl_srv1 ...
acl acl_srv2 ...
use_backend srv1_only if acl_srv1
use_backend srv2_only if acl_srv2
default_backend all_srv
backend all_srv
server s1 1.1.1.1:80 check
server s2 2.2.2.2:80 check
backend srv1_only
server s1 1.1.1.1:80 track all_srv/s1
backend srv2_only
server s2 2.2.2.2:80 track all_srv/s2
Regards,
Willy