Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

Slow response for none-EU located servers (Australia, USA, Japan, Africa, ...) #16

Open
karussell opened this issue Sep 1, 2015 · 0 comments

Comments

@karussell
Copy link
Member

The handshake for SSL is expensive as many times it needs to send forth and back something. So the solution is to keep this handshake at the initial request only (our server should support this via keepalive) and follow up requests are much faster, which you can try e.g. via:

URL="https://graphhopper.com/api/1/route?key=[YOUR_KEY]&point=-34.0102021%2C151.1270069&point=-33.95237450124232%2C150.9959234857656&vehicle=car&locale=en"
curl -w "tcp: %{time_connect} ssl:%{time_appconnect} all: %{time_total}\n" -sk -o /dev/null $URL -o /dev/null $URL -o /dev/null $URL

Another solution will be established in the future to have several servers across the world. Initial connections can be tested from various locations with this service

Our Java and JavaScript clients already do this 'keepalive' for you as JavaScript uses the default for HTTP1.1 and Java uses okhttp having similar defaults.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

1 participant