On 17 May 2015 at 16:30, Richard Z. <ricoz....@gmail.com> wrote:
> On Sun, May 17, 2015 at 05:09:59PM +0200, Jochen Topf wrote:
>> On So, Mai 17, 2015 at 04:46:24 +0200, Maarten Deen wrote:
>> > Is it normal that the a, b and c.tile.openstreetmap.org IP-adresses refer 
>> > to
>> > the same server? For me, they all refer to amsterdam.tile.openstreetmap.org
>> > and for some reason it is not responding very well (lots of read times out
>> > messages in JOSM).
>> > To me it would seem more logical to have different tileserveraliases refer
>> > to different physical servers.
>>
>> Thats normal. The a/b/c stuff is a workaround for a "feature" in browsers 
>> that
>> only allow a limited number of connections to the same host at the same time.
>> (Modern browsers probably don't have this limitation any more, sombody should
>> probably check whether we need the a/b/c stuff any more.) It is not ment to
>> be some kind of load-balancing.
>
> probably doing more harm than good by preventing caching.
>

Nope. The tiles server alias (a,b,c) are selected using a hashing
algorithm which always selects the same alias for the same tile:
https://github.com/Leaflet/Leaflet/blob/master/src/layer/tile/TileLayer.js#L134
(also applies to OpenLayers).

Overdue me explaining how the OpenStreetMap Tile CDN works:

We have 16 distributed edge cache servers all over the world [1],[2],[3].
These cache servers are monitored in near realtime by pingdom for outages.
We use GeoDNS [4] for [a|b|c].tile.openstreetmap.org which points a
client to the closest or preferred cache server for the client's
region. [5]
We rebuild [6] the GeoDNS when pingdom notices an outage, visitors are
moved across shortly once their DNS TTL has expired (~5mins)
The cache servers use 2 backend rendering servers (orm + yevaud), with
one being the preferred server [7] (cache hot path). We monitor the
backends similarly with pingdom and GeoDNS updates.

The cache servers have a fairness algorithm (token bucket) which
ensures that no single client / network can degrade the service for
others.

The 2x backend rendering servers are near perpetually overloaded,
particularly during style updates. The short-term solution would be to
add in an additional rendering server, but longer term it would be
better to move to a model where tiles (png) are rendered on the edge
cache servers with the backend servers producing vector tiles which
are pulled by the edge cache servers. There are a few people working
on this, but no complete working open source solution ready to go.
Some of us on the OSM operations team + a team from Wikimedia are
watching developments closely. ;-)

1: http://wiki.openstreetmap.org/wiki/Servers#Other
2: http://dns.openstreetmap.org/tile.openstreetmap.org.html
3: http://wiki.openstreetmap.org/wiki/Servers/Tile_CDN
4: https://github.com/openstreetmap/chef/tree/master/cookbooks/geodns
5: https://git.openstreetmap.org/dns.git/blob/HEAD:/src/tile.openstreetmap
6: https://git.openstreetmap.org/dns.git/blob/HEAD:/bin/mkgeo
7: https://git.openstreetmap.org/dns.git/blob/HEAD:/src/render.openstreetmap

Kind regards,
Grant
Part of the OSM operations team.

_______________________________________________
talk mailing list
talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/talk

Reply via email to