Traffic API Proxy | On-Premise | 2GIS Documentation

Traffic API Proxy

The Traffic API Proxy service allows fetching the real-time traffic data for other On-Premise services that demand this data.

On-premise Traffic API Proxy service architecture

This On-Premise service comprises the single NGINX reverse proxy service.

The NGINX reverse proxy service:

  1. Fetches the real-time traffic data from public Traffic Update servers.

    Traffic API Proxy can be deployed in different configurations, which depends on the Traffic Update servers used:

    • If the proxy uses the https://traffic-jams.2gis.com Traffic Update servers, the data is provided in vector format that is suitable for Navigation services.
    • If the proxy uses the https://traffic0.edromaps.2gis.com/ or https://traffic0.maps.2gis.com/ Traffic Update servers, the data is provided in raster format.
  2. Serves this data via HTTP.

    Important note:

    Different services require different Traffic API Proxy deployments, configured with suitable Traffic Update servers (the proxy.host setting). See the documentation of corresponding On-Premise services for details.

    Generally, the Traffic API Proxy serves the data to end users and applications that are using On-Premise services. However, there are a few exceptions to this:

    • The Traffic API Proxy serving raster traffic data may also be accessed by SPCore backend.
    • The Traffic API Proxy serving traffic data for Navigation services can only be accessed by Navi-Back service.

    Example for the Maps service with MapGL JS API and Tiles API:

    Example internet access diagram for On-Premise Maps service

Internet access must be granted to the NGINX reverse proxy service, so it can access the public Traffic Update servers.

For more information on how to check requirements for each service, refer to the System requirements document.

Configure the service to use the ingress.hosts.host address as the Traffic API endpoint. See the documentation of corresponding On-Premise services for details.

What's next?