Hi, I am trying to figure out if a solution I am considering is logically/technically viable, not asking for anyone to do my work :-)
We have been using a pair of failover HAProxy servers to both balance load across a number of backends in different data centers, as well as to shape traffic coming to our site if the user agent is mobile, and they have not set a cookie to avoid our mobile site, we send them to the home page of our mobile site. As we deploy more responsive pages on the full site (http://my.full.site.com) we want to send that mobile traffic there rather than the dedicated mobile site. We also want to be able to sent request for specific full site page to specific mobile site pages. The use case is as follows: Inbound http request (http://my.full.site.com/specific/URI/page.html) is evaluated to see if the user agent is one of a mobile type (we have an acl to do this). IF mobil is False, THEN request is passed to one of the full site backends and the response is served without further manipulation IF mobile is True, THEN the request is passed to the backend and the response header is evaluated for the presence of two custom response headers (e.g. responsive_page AND mobile_url) IF custom response header responsive_page = True THEN pass the page back to the requester without manipulation IF custom response header mobile_url is populated with an alternate URL (mobile_url : http://my.mobile.com/different-specific/URI/page.html) THEN the request is redirected to that specific mobile_url. ELSEIF Return a Default mobile page (http://my.mobile.com/home.html) At present, all mobile traffic is evaluated, and if mobile is true then it ALL REQUESTS go to a single default mobile page on the mobile server (http://my.mobile.com/home.html). We also want to be able to match some specific page requests to the full site, and respond to those with custom pages on mobile site, rather then the generic default mobile page. If the page developers can populate the responsive_page and mobile_url header response values themselves, then they can migrate pages without having to request proxy changes. I realize I am I taking an inbound request to HAProxy, evaluating the user agent, then if mobile, evaluating the response to HAProxy, and if there is a value in the response header using that to initiate a new backend request response cycle to fulfill the original inbound request. I can see that is a loop. I know it cannot be the most efficient thing, but it would allow us to have custom redirection that can be maintained by the owners of the backend pages. Any feedback would be appreciated. Robert ____________________________________________ Robert Snyder Outreach Technology Services The Pennsylvania State University The 329 Building, Suite 306E University Park PA 16802 Phone: 814-865-0912 E-mail: rsny...@psu.edu
signature.asc
Description: Message signed with OpenPGP using GPGMail