With version 2.13 and earlier, APIcast will load each service individually, and with 2.14 APIcast will load all services at once to improve performance. The change has been introduced in this JIRA ticket THREESCALE-8373
As a result, if APICAST_SERVICES_LIST is defined, APIcast will iterate through all services and filter out unwanted services and generating an warning log for each service.
For example, I setup 3scale with 5 products and run it with the following:
THREESCALE_DEPLOYMENT_ENV=production \ APICAST_LOG_LEVEL=warn \ APICAST_CONFIGURATION_LOADER=boot \ APICAST_SERVICES_LIST=2555418015729 \ APICAST_POLICY_LOAD_PATH=nil\ APICAST_CONFIGURATION_CACHE=300 \ APICAST_MANAGEMENT_API=debug\ THREESCALE_PORTAL_ENDPOINT=<3SCALE_PORTAL_URL> \ ./bin/apicast
APIcast will log a warning for each service that not included in APICAST_SERVICES_LIST and the warning log can be observed in every APICAST_CONFIGURATION_CACHE seconds
loading production environment configuration: /opt/app-root/src/gateway/config/production.lua 2024/03/14 04:21:41 [warn] 874933#874933: [lua] configuration.lua:166: filter_services(): filtering out service 2555418021383 2024/03/14 04:21:41 [warn] 874933#874933: [lua] configuration.lua:166: filter_services(): filtering out service 2555418022579 2024/03/14 04:21:41 [warn] 874933#874933: [lua] configuration.lua:166: filter_services(): filtering out service 2555418022580 2024/03/14 04:21:41 [warn] 874933#874933: [lua] configuration.lua:166: filter_services(): filtering out service 2555418022581 2024/03/14 04:21:41 [warn] 874933#874933: [lua] configuration.lua:166: filter_services(): filtering out service -1 2024/03/14 04:21:43 [warn] 874948#874948: *2 [lua] configuration.lua:166: filter_services(): filtering out service 2555418021383, context: ngx.timer 2024/03/14 04:21:43 [warn] 874948#874948: *2 [lua] configuration.lua:166: filter_services(): filtering out service 2555418022579, context: ngx.timer 2024/03/14 04:21:43 [warn] 874948#874948: *2 [lua] configuration.lua:166: filter_services(): filtering out service 2555418022580, context: ngx.timer 2024/03/14 04:21:43 [warn] 874948#874948: *2 [lua] configuration.lua:166: filter_services(): filtering out service 2555418022581, context: ngx.timer
This can mean too many unnecessary logs if the setup has a large number of services.