http layer7 hostheader balance

Hi

Can the RouterOS handle to passtraffic to a given host based on the hostheader?

example

site1.domain.com → host1
site2.domain.com → host2
site3.domain.com → host3 + host4

Thanks!

No. HTTP headers are available only after the initial TCP handshake. Destination NAT must be determined on the first packet of a connection (the initial SYN), so the HTTP headers aren’t available yet.
RouterOS does have a caching proxy for client’s outbound traffic, but is not a full fledged HTTP proxy that can distribute requests over several servers in the back.

Thanks for the fast reply, and bummer it can’t do it :frowning: - damn!

:slight_smile:

is this my solution? → http://wiki.mikrotik.com/wiki/Multiple_Web_Servers

Huh, had never seen that. It can work - but if you’re using the internal DNS for anything else it may break other things you rely on. Also, it cannot do “site3.domain.com → host3 + host4” as it’s a 1:1 mapping. And the built in proxy isn’t particularly advanced, and as mentioned on that page you can’t do HTTPS.
For production sites I’d get at least something like an Apache box with mod_proxy to do this for you instead. Then forward all traffic to Apache, and let it proxy all the requests by itself.

Neat, though.