Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-8508

Loading configuration via /admin/api/account/proxy_configs

XMLWordPrintable

    • API CCS Sprint 39 (3Scale), API CCS Sprint 40 (3Scale), API CCS Sprint 44 (3Scale) 2

      This RFE is to update the standard APIcast configuration endpoint to use /admin/api/account/proxy_configs/${ENV}, instead of loading services individually via /admin/api/services/${ID}/proxy/configs/${ENV}/${VERSION}.json', when the THREESCALE_PORTAL_ENDPOINT is an admin portal. Nothing should change when THREESCALE_PORTAL_ENDPOINT points to master.

      The new endpoint provides a configuration similar to that returned by the master endpoint, it takes two query parameters: host and version and returns all services that match the given host.

      With the proposed implementation, APICAST_LOAD_SERVICES_WHEN_NEEDED is deprecated and the configuration is fetched "when needed" by default whenever possible, with the following logic:

      • THREESCALE_PORTAL_ENDPOINT has no path (admin)
        • APICAST_CONFIGURATION_LOADER=boot
          • http://${THREESCALE_PORTAL_ENDPOINT}/admin/api/account/proxy_configs/<env>.json?version=latest

            (i.e. all services from proxy_configs endpoint). Using the new endpoint now one request is enough, no need to loop through all services.

        • APICAST_CONFIGURATION_LOADER=lazy
          • http://${THREESCALE_PORTAL_ENDPOINT}/admin/api/account/proxy_configs/<env>.json?host=host&version=latest

             (i.e. services that match host,  from proxy_configs endpoint). This matches the current behaviour when APICAST_LOAD_SERVICES_WHEN_NEEDED is enabled.

      • THREESCALE_PORTAL_ENDPOINT has a path (master)
        • APICAST_CONFIGURATION_LOADER=boot
          • http://${THREESCALE_PORTAL_ENDPOINT}/<env>.json

             (i.e. all services from master endpoint). Same as the current behaviour.

        • APICAST_CONFIGURATION_LOADER=lazy
          • http://${THREESCALE_PORTAL_ENDPOINT}/<env>.json?host=host

             (i.e. services that match host from master endpoint). Same as the current behaviour.

      Open Points:

      • Currently the endpoint /admin/api/account/proxy_configs/${ENV} is paginated, and APIcast does not handle pages, Pagination will be implemented as part of https://issues.redhat.com/browse/THREESCALE-8373
      • The exception to the logic above would be when the env var APICAST_SERVICE_%s_CONFIGURATION_VERSION is provided. In that case, the gateway would load service's proxy configuration one by one, ie. 1 req to fetch services, N request for each service to fetch proxy configuration. Note that APICAST_SERVICE_%s_CONFIGURATION_VERSION cannot be used when APIcast is configured to fetch master proxy configuration (i.e. the portal endpoint has a path).

            Unassigned Unassigned
            rhn-support-sillumin Samuele Illuminati (Inactive)
            Darren Fennessy Darren Fennessy
            Jakub Urban Jakub Urban
            Eguzki Astiz Lezaun Eguzki Astiz Lezaun
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 3 days
                3d
                Logged:
                Time Spent - Not Specified
                Not Specified