Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users
implementing an SLA for a request in apache
 

Index | Next | Previous | View Flat


nrichter at gmail

Jul 3, 2009, 9:56 AM


Views: 218
Permalink
implementing an SLA for a request in apache

Hi,

Here's a problem I'd like to solve. Configure apache to receive a
request and proxy/forward it off to a backend app server (tomcat) ..
wait a specified period of time .. and no response is received send
back a static file or a return code like 204.

Essentially it's a combination between the below mod_rewrite and
mod_alias directives with a timeout. Below example uses solr without
loss of generality.

RedirectMatch 204 /search/(.*)$
RewriteRule ^/search/(.*)$ http://backend:8080/solr/$1 [P]

Logic below:

If url matches rewrite-rule regex then
{
set timer for 500ms with timer_callback()
force proxy to secondary url after rewriting it
if(response from proxy is > 199 and < 300)
return response
else
return 204
}

timer_callback()
{
send back 204
}

Instead of returning 204 one could also serve back a static file.

The general idea is to expose a url that has a near-guaranteed
response time limit where a 204 or static default is acceptable
behaviour.

I suspect that we'll need to write an apache module to do this.. yet
surely this question has been asked before? Ideas?

Thanks - Neal

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe[at]httpd.apache.org
" from the digest: users-digest-unsubscribe[at]httpd.apache.org
For additional commands, e-mail: users-help[at]httpd.apache.org

Subject User Time
implementing an SLA for a request in apache nrichter at gmail Jul 3, 2009, 9:56 AM
    Re: implementing an SLA for a request in apache krist.vanbesien at gmail Jul 6, 2009, 3:39 AM
    Re: implementing an SLA for a request in apache nrichter at gmail Jul 6, 2009, 8:23 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.