mod_proxy_core commited to svn 5
mod_proxy_core just got commited to SVN and is now available to testers.
server.modules = ( ..., "mod_proxy_core", .. )
## works
$HTTP["url"] =~ "^/proxyme/" {
proxy-core.balancer = "round-robin"
proxy-core.protocol = "http"
proxy-core.backends = ( "wikipedia.org" )
## to be done
proxy-core.rewrite-response = (
"Location" => (
"^http://en.wikipedia.org/(.*)" => "http://127.0.0.1:1025/$1" ) )
proxy-core.rewrite-request = (
"URI" => (
"^/proxyme(/.*)" => "$1" ) )
}
The above config forwards everything from /proxyme/ to wikipeedia.org. It resolves the domain wikipedia.org and is using one of the address to forward the request. As you already see there will be a request and response header rewriter for rewriting Location headers and URIs.
What works ?
- Round-Robin Load-Balancing
- Failover of a backend is down
- HTTP proxying
- HTTP/1.1
- Keep-Alive
What is missing
- FastCGI, SCGI and CGI backends
- Header Rewriting
Show me the source, Luke
In the source-browsers you can also take a look at the code to see what is going on in there.
Trackbacks
Use the following link to trackback from your own site:
http://blog.lighttpd.net/articles/trackback/1775
Comments
-
Will there be a way to send-to-proxy-unless-a-static-file-exists (think: rails page caching), or will we still need to lean on mod_cml?
-
Very cool Jan! Thanks for your hard work on Lighty. I will be testiong this right away.
-
If the proxy module reads the HTTP expires header and has an own cache of configurable size, Rails and similar systems would only need to send proper expiry headers instead of the static file hack.
-
Kudos Jan.
-
so does this mean I dont have to figure out a way to load balance with Apache?? If so, a big freaking thank you to the lighttpd staff :) --jake