Journey-Planner-v3
is a national service for journeyplanning journey planning for all public transport in Norway. This service is used by many journeyplanners and 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 profession users with an agreement partners of Entur will have a custom policy agreed.
There are two separate polices:
...
Quota - the number of request pr. minute
SpikeSpikeArrest - arrest - 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 ?)
Code Block |
---|
Spike-Allowed: 2 Spike-Range: per-second |
Example Quota
(header name ?)
Code Block |
---|
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.