[Tilesathome] Two new ROMA...

Mathieu Arnold mat at mat.cc
Mon Nov 24 23:50:35 GMT 2008



+--On 24 novembre 2008 21:49:03 +0100 Florian Lohoff <flo at rfc822.org> wrote:
| On Mon, Nov 24, 2008 at 09:43:31PM +0100, Mathieu Arnold wrote:
|> 
|> +--On 24 novembre 2008 21:37:22 +0100 Florian Lohoff <flo at rfc822.org>
|> wrote:
|> | On Mon, Nov 24, 2008 at 12:20:13PM -0500, Matthias Julius wrote:
|> |> 
|> |> True, this could be another approach.  I guess the HAProxy queries
|> |> another ROMA server if the first one returns an error.  But if one of
|> |> the ROMA servers returns bogus data how do you find out which one it
|> |> is?
|> | 
|> | Probably instead of using a proxy just spit out redirects. For this to
|> | work we would need a way for the redirector to query the state of the
|> | ROMAs ...
|> 
|> The proxy tries to get the bbox 0,0,0,0, to determine if the backend
|> works right.
| 
| And then it redirects or requests and forwards the client bbox?

The following patch :

@@ -537,6 +534,19 @@
     #
     my $bboxstring = param("bbox");
 
+    if ( defined($bboxstring) and ( $bboxstring eq '0,0,0,0' or
$bboxstring eq '0' ) ) {
+	print header( -status => 200 ),
+	    start_html(
+			-title   => "Working",
+			-BGCOLOR => 'white',
+		      ),
+	    h2("ok"),
+	    end_html;
+
+	writelog("health check");
+	next;
+    }
+
     if ( !defined($bboxstring) || $bboxstring !~ /^[\d\,\.\-]+$/ ) {
 	displayerror( 400, "BBox string broken" );
 	removepid();

Allow the map.fcgi to say he's ok for requests if the bbox "0,0,0,0" or "0"
are asked, I'd rather check for a fake bbox "0" because someone, one day,
might want to look at nodes placed at 0,0 :-)

Once every three ROMA server have this patch, I could ask the load balancer
to check for bbox 0 instead of 0,0,0,0.

-- 
Mathieu Arnold




More information about the Tilesathome mailing list