#19054 closed enhancement (wontfix)
http/2 connections shouldn't use {switch} in URLs
Reported by: | Stereo | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin http2 | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Activate the "OpenStreetMap Carto (Standard)", which adds https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png
What is the expected result?
The plugin notices that the server supports http/2
Downloads all get made to the same domain
What happens instead?
2020-04-08 21:31:28.983 INFO: GET https://**a**.tile.openstreetmap.org/17/67685/44497.png -> HTTP_2 200 (362 ms; 9.99 kB)
2020-04-08 21:31:29.010 INFO: GET https://**b**.tile.openstreetmap.org/18/135371/88994.png -> HTTP_2 200 (336 ms; 4.78 kB)
2020-04-08 21:31:28.839 INFO: GET https://**c**.tile.openstreetmap.org/18/135372/88995.png -> HTTP_2 200 (746 ms; 3.21 kB)
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-02-26 10:50:27 +0100 (Wed, 26 Feb 2020) Revision:15937 Build-Date:2020-02-26 09:52:41 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (15937 en_GB) Mac OS X 10.15.3 OS Build number: Mac OS X 10.15.3 (19D76) Memory Usage: 2920 MB / 4096 MB (2155 MB allocated, but free) Java version: 14+36, AdoptOpenJDK, OpenJDK 64-Bit Server VM Screen: Display 69733632 1680x1050 Maximum Screen Size: 1680x1050 Dataset consistency test: No problems found Plugins: + AddrInterpolation (35405) + CommandLine (35405) + ImportImagePlugin (35248) + Mapillary (1.5.20) + MovementAlert (1511141840) + OpeningHoursEditor (35405) + PicLayer (35405) + RelationDissolve (0.2.0) + alignways (35405) + apache-commons (35362) + apache-http (35092) + areaselector (359) + austriaaddresshelper (57) + buildings_tools (35405) + changeset-viewer (22) + conflation (0.6.4) + continuosDownload (91) + contourmerge (v0.1.6) + ejml (35313) + geotools (35169) + gridify (1577091848) + http2 (35356) + imagery-xml-bounds (35313) + jaxb (35092) + jna (35092) + jogl (1.2.3) + jts (35122) + log4j (35092) + opendata (35405) + openqa (0.1.9) + poly (35248) + public_transport (35405) + reltoolbox (35405) + reverter (35407) + splinex (35405) + terracer (35327) + todo (30306) + undelete (35396) + utilsplugin2 (35405) + wikipedia (1.1.3) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/BicycleJunction&preset&zip=1 + http://osmtools.de/josm/steps.xml + https://josm.openstreetmap.de/josmfile?page=Presets/Historic_Stone&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Towers&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Golf_Course&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/PublicTransportOneClick&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Bus_lanes&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Heritage&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Historical_Objects&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/public_bookcase&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/Stolpersteine&zip=1 + https://josm.openstreetmap.de/josmfile?page=Presets/BuildingPreset&zip=1 + https://gitlab.com/k127/josm-presets/raw/master/diplomatic.xml Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Lit&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Surface&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Modified&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/LessObtrusiveNodes&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Noname&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Power&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/PowerMapping&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/BesideTheRoad_Speed&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/TreeCrownDiameter&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&style&zip=1 - https://github.com/simon04/coloured-addresses.mapcss/raw/master/dist/coloured-addresses.mapcss - https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Suburb&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&style&zip=1 - https://github.com/GlassOceanos/indoor-JOSM-style/archive/master.zip - https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/PTStops&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/SimpleRoofTags&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/SimpleBuildingTags&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/NumberedCycleNodeNetworks&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/NumberedWalkingNodeNetworks&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/NewHighwayColors&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Noname&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/iD&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Potlach2_access&zip=1 Validator rules: + http://www.openrailwaymap.org/validator/openrailwaymap.validator.mapcss + https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1 + http://www.openrailwaymap.org/validator/de-openrailwaymap.validator.mapcss + https://josm.openstreetmap.de/josmfile?page=Rules/MissingWeekdays&zip=1 + https://raw.githubusercontent.com/nlehuby/transport_mapcss/master/transport.validator.mapcss Last errors/warnings: - W: java.net.http.HttpTimeoutException: request timed out - W: java.net.http.HttpTimeoutException: request timed out - W: java.net.http.HttpTimeoutException: request timed out - W: java.net.http.HttpTimeoutException: request timed out - W: restricted header name: "Connection" - W: restricted header name: "Connection" - W: restricted header name: "Connection" - W: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.ConnectException: HTTP connect timed out - E: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.ConnectException: HTTP connect timed out - W: org.openstreetmap.josm.io.OsmTransferException: Could not connect to the OSM server. Please check your internet connection.. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.http.HttpConnectTimeoutException: HTTP connect timed out. Cause: java.net.ConnectException: HTTP connect timed out
Attachments (0)
Change History (13)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
You don't give a why. What's different about http/2 that you can triple serverload for individual server?
comment:3 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
HTTP/2 supports multiple streams inside one TLS/TCP connection, and implements its own flow control: https://developers.google.com/web/fundamentals/performance/http2/#streams_messages_and_frames
comment:4 by , 4 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The name based switch has two reasons.
- circumvent per host limitations in browsers
- load balancing/distribution
The first was never an issue for JOSM and the second isn't handled by http/2.
The http/2 specifics don't give any reason for special handling.
follow-up: 7 comment:5 by , 4 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Of course per host limitations is a thing in JOSM - that's why we have imagery.wms.simultaneousConnections
http/2 has https://developers.google.com/web/fundamentals/performance/http2#request_and_response_multiplexing which massively helps with that.
See also https://love2dev.com/blog/domain-sharding-http-2/
@simon04 thank you, I'll see if I can change that on openstreetmap.org :)
comment:6 by , 4 years ago
@simon04 done, thanks for the idea! https://github.com/openstreetmap/openstreetmap-website/pull/2584
comment:7 by , 4 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Replying to Stereo:
Of course per host limitations is a thing in JOSM - that's why we have imagery.wms.simultaneousConnections
We do this to limit the number of requests issued in short time. We don't do this this circumvent browser limitations.
http/2 has https://developers.google.com/web/fundamentals/performance/http2#request_and_response_multiplexing which massively helps with that.
No. It does not. Sending multiple request per single TCP stream is nothing new to HTTP/2. That's possible with HTTP/1.1 already. What's new is the multiplexing to reduce the delays. Contrary to what you state that usually will increase the load instead of reducing it (even if transport can be handled a bit more efficient). Have a look how complex HTTP/2 implementations on server side have to be to handle that part of the protocol!
See also https://love2dev.com/blog/domain-sharding-http-2/
@simon04 thank you, I'll see if I can change that on openstreetmap.org :)
It seems you have a fundamental misunderstanding here. If you only use multiple domains to INCREASE the amount of parallel connects (point one of my answer) then yes, that's no longer necessary with HTTP/2. But as said, for JOSM this was NEVER necessary. We simply can increase the number of parallel connects. We could do thousands of parallel requests (I e.g. wrote a perl based test tool for a server software which can issue about 50000 connects in a few seconds). That limitation is there to protect servers from actually doing that: JOSM sending too much requests. That's why we also never did a per domain limiting, but use an overall queue (I think this is still the case). With JOSM we're using a lot of free resources: Our main goal is to not annoy the server operators, fast display in the client is only secondary to this!
The second purpose of separate domain names is load distribution and as said HTTP/2 does not touch that functionality. It's much easier to have 3 or 5 servers answering for tile requests when they have different names. If you have a more complex infrastructure you can handle that via one domain name or even via one IP address, but as said, multiple names make it easier.
comment:8 by , 4 years ago
P.S. Using multiple DNS names because of reason one BTW makes no longer sense for a long time now. Browsers changed a lot over the years. You also can see that some map providers dropped the multi-names during the HTTPS transition because of this.
So it is only load balancing/distribution nowadays. And that goal remains valid. And it cannot be auto-detected (even if all the names point to the same IP it still can have load balancing reasons or plans for future balancing).
So your submission to openstreetmap-website you mention above makes no sense. When the switch for openstreetmap is done for reason two then the proposed changes are simply wrong. If it is a legacy system for reason one, then it should be dropped independent from the fact whether HTTP/1.1 or HTTP/2 is used.
follow-up: 13 comment:9 by , 4 years ago
All {a.,b.,c.,}tile.openstreetmap.org
resolve to tile.geo.openstreetmap.org
$ echo {a.,b.,c.,}tile.openstreetmap.org | xargs -n1 host a.tile.openstreetmap.org is an alias for tile.geo.openstreetmap.org. tile.geo.openstreetmap.org is an alias for corvallis-01.tile.openstreetmap.org. corvallis-01.tile.openstreetmap.org has address 140.211.167.104 corvallis-01.tile.openstreetmap.org has IPv6 address 2605:bc80:3010:700::8cde:a768 b.tile.openstreetmap.org is an alias for tile.geo.openstreetmap.org. tile.geo.openstreetmap.org is an alias for corvallis-02.tile.openstreetmap.org. corvallis-02.tile.openstreetmap.org has address 140.211.167.105 corvallis-02.tile.openstreetmap.org has IPv6 address 2605:bc80:3010:700::8cde:a769 c.tile.openstreetmap.org is an alias for tile.geo.openstreetmap.org. tile.geo.openstreetmap.org is an alias for corvallis-01.tile.openstreetmap.org. corvallis-01.tile.openstreetmap.org has address 140.211.167.104 corvallis-01.tile.openstreetmap.org has IPv6 address 2605:bc80:3010:700::8cde:a768 tile.openstreetmap.org is an alias for tile.geo.openstreetmap.org. tile.geo.openstreetmap.org is an alias for corvallis-02.tile.openstreetmap.org. corvallis-02.tile.openstreetmap.org has address 140.211.167.105 corvallis-02.tile.openstreetmap.org has IPv6 address 2605:bc80:3010:700::8cde:a769
comment:10 by , 4 years ago
@simon04 This is derailling the ticket quite a bit, but are you using a US-based DNS server? Corvallis is far away from you; I assume your tiles will be quite slow.
https://dns.openstreetmap.org/tile.openstreetmap.org.html shows what you should be getting if the DNS server can accurately tell where you're from.
comment:11 by , 4 years ago
I'm using 1.1.1.1 from Cloudflare. Not sure how to make this DNS server act more locally.
Google's 8.8.8.8 resolves to pula.tile.openstreetmap.org
$ host a.tile.openstreetmap.org 8.8.8.8 a.tile.openstreetmap.org is an alias for tile.geo.openstreetmap.org. tile.geo.openstreetmap.org is an alias for pula.tile.openstreetmap.org. pula.tile.openstreetmap.org has address 193.198.233.211 pula.tile.openstreetmap.org has IPv6 address 2001:b68:4cff:3::3
comment:12 by , 4 years ago
Yeah, I switched from Cloudflare to Google for that reason. Privacy vs convenience.
comment:13 by , 4 years ago
Replying to simon04:
All
{a.,b.,c.,}tile.openstreetmap.org
resolve totile.geo.openstreetmap.org
As said this in itself says nothing. It is important what the admins want. Do they want different tile server names used or is this legacy and something else is preferred. IPs and names in itself don't tell this when you don't know the concept behind.
This task is somewhat demanding: The plugin has to propagate this information to
org.openstreetmap.gui.jmapviewer.tilesources.TemplatedTMSTileSource
.org.openstreetmap.gui.jmapviewer.FeatureAdapter
might come to rescue –String getNextRandomPart(String[] parts)
which can be overriden?Btw: Also https://www.openstreetmap.org/ shouts for this improvement… ;-)