Ticket #137 (closed enhancement: fixed)

Opened 5 years ago

Last modified 20 months ago

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: External ID:
state: New Browser: All
Operating System: All

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

Changed 3 years ago by madair

  • status changed from new to assigned
  • milestone changed from 2.0 to 2.1

Changed 3 years ago by madair

  • milestone changed from 2.1 to 2.2

Changed 3 years ago by madair

  • milestone changed from 2.2 to 2.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"]

2. 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.

Changed 20 months ago by jng

  • status changed from assigned to closed
  • resolution set to fixed

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.