Journey-Planner-v3
is a national service for journey planning for all public transport in Norway. This service is used by many journey planners apps/webs or other services and can be considered a part of the digital infrastructure for the Norwegian mobility sector. To ensure normal usage and stability of this service rate-limiting policies applies for all users. Users without an agreement with Entur will get the default policy and rate limit policies with partners of Entur will have a custom policy.
There are two separate polices:
Trip-request - One policy only applies for trip-requests as these are the most resource consuming.
Other-request - One policy applies for all other request available in the graphQL API.
Each policy is split into to elements:
Quota - the number of request pr. minute
SpikeArrest - the number of request pr. second
Policy levels
Level | Trip-request Quota | Trip-requests SpikeArrest | Other-request Quota | Other-request SpikeArrest |
---|---|---|---|---|
Non-identified consumers | 30 | 2 | 60 | 20 |
Consumers identified with | 500 | 150 | 1000 | 200 |
Entur Partners | custom | custom | custom | custom |
Monitoring of policy status
It is expected that consumers have control over their policy status with respect to traffic patterns. All responses from the service reply with a header value of current usage and remaining quota/spikearrest. If your request hits the policy consumers will get a http 429
response.
Example SpikeArrest
(header name ?)
Spike-Allowed: 2 Spike-Range: per-second
Example Quota
(header name ?)
Rate-Limit-Allowed: 30 Rate-Limit-Available: 29 Rate-Limit-Expiry-Time: Mon Jan 16 2023 12:17:34 GMT-0000 (UTC) Rate-Limit-Range: "per-minute" Rate-Limit-Used: 1
Re-try policy
It makes sense for consuming apps/webs to implement a conservative re-try policy on spike-arrest violations
as spikes in traffic loads may occur.
Consuming apps/webs should NOT implement a re-try policy for quota-violations
as this only will make things worse for app/web users.