Opened 16 years ago

Closed 13 years ago

#137 closed enhancement (fixed)

Support multiple hosts for tile maps

Reported by: jbirch Owned by: madair
Priority: P2 Milestone: 2.3
Component: Widgets Version: SVN
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

One of the limiting factors of perceived performance for tiled maps is that (by RFC) the number of active HTTP 1.1 connections to a server should be limited to 2. This providers a very small pipeline for service multiple images, javascript files, and other supporting resources. OpenLayers works around this by allowing you to specify multiple hosts to retrieve tiles from as a comma-separated list, and accesses them in a round-robin fashion. This could either be used to make requests to several load-balanced tile servers, or a single server with multiple DNS host entries pointing to it.

To my understanding, Fusion currently requires that the user specify a single MapGuide MapAgent or MapServer CGI in its config file, and then uses that for all requests of that type.

I am not sure what the implications of this would be (does OpenLayers also round-robin non-image requests?) but I believe that an ideal system would use a single host from the list per-client for all non-map requests so that you don't run into session problems, but would use a list of hosts for tiled map requests.

One way of supporting this would be to leave the WebTierURL specification in the config.json file alone (and use this for non-mapimage requests), and add an extension to the Map element to specify which hosts to retrieve maps from. Again, I'm not sure of how this would work with Fusion/OpenLayers internals, but it seems like the least invasive approach, and would also lend itself well to defining external sources for non-MapGuide/MapServer map types.

Change History (4)

comment:1 by madair, 14 years ago

Milestone: 2.02.1
Status: newassigned

comment:2 by madair, 14 years ago

Milestone: 2.12.2

comment:3 by madair, 14 years ago

Milestone: 2.22.3

it appears that this is already supported in Fusion/OpenLayers, but only for static tilecache as opposed to retrieving tiles from the MapGuide server.

The way to configure it is:

  1. in config.json, set the mapguide/tileCacheUrl with an array of strings, which are the hosts that are serving up the tiles, e.g.:

"tileCacheUrl": ["http://host01/sheboygan","http://host02/sheboygan","http://host03/sheboygan"]

  1. use the OL MapGuide layer useHttpTile option. Set this in the <Map> element extension like so:

<Map xsi:type="MapGuideLayerType">

<Type>MapGuide</Type> <SingleTile>false</SingleTile> <Extension>

<ResourceId>Library://Samples/Sheboygan/MapsTiled/Sheboygan.MapDefinition</ResourceId> <Options>

<useHttpTile>true</useHttpTile>

</Options>

</Extension>

</Map>

And you should get your tiles pulled randomly from all the servers in the array. I don't have a setup to fully test this but in Firebug I can see that tiles are being requested from the 3 servers (with 404 responses since I don't actually have anything at those URLs).

Supporting this mechanism with tiles served from the MapGuide server would require some coding changes but is viable. Is that something that should be done? I suspect most production sites would build a pre-seeded tile cache.

In any case, bumping this to 2.3 since it already works for the most part or close the ticket if the above is sufficient.

comment:4 by jng, 13 years ago

Resolution: fixed
Status: assignedclosed

r2428 introduces another option of specifying a list of alternate hostnames and ip addresses in the map extension element. Given the variety of options available, this is pretty much fixed.

Note: See TracTickets for help on using tickets.