Think one way to do this would be: - use the header_rewrite plugin to check the cookie value and set the destination/origin Host. Not sure about the whole IP thing... perhaps make up a domain and set /etc/hosts to 100.100...? Or just set the Host to 100.100..? - use the cachekey plugin to put the cookie value in the cachekey.
something like: map http://inbound.example.com http://origin.example.com \ @plugin=cachekey.so @pparam=--include-cookies=cookienamehere @plugin=header_rewrite.so @pparam=header_rewrite.config with header_rewrite.config containing: cond %{COOKIE:cookienamehere} ="key=2" set-destination HOST 100.100.100.100 On Wed, Jul 13, 2016 at 3:16 AM, Reindl Harald <[email protected]> wrote: > > > Am 13.07.2016 um 11:37 schrieb Alex Sviridov: >> >> I need a reverse proxy which makes server mapping according to some >> value in cookie. >> >> For example, if there is a variable "key" and it is equal to 2 (key=2) >> then request must be redirected >> to server 100.100.100.100. >> >> Can apache traffic server do that? > > > not that i know but i am pretty sure you should start to describe your > probklem and waht you try to achieve instead ask for a specific solution > > in case of load-balancing the servers should use a shared session storage so > that it don't matter on which backend machine a request ends >
