You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -67,7 +78,7 @@ docker run --name="apigateway" \
67
78
```
68
79
69
80
`s3://api-gateway-config-bucket` should contain something similar to what's in the [api-gateway-config](https://github.com/adobe-apiplatform/apigateway/blob/master/api-gateway-config/) folder.
70
-
For any customizations it would be good to start from there.
81
+
For any customization it would be good to start from there.
71
82
There are only 2 files that won't be synchronised:
72
83
*`/etc/api-gateway/conf.d/includes/resolvers.conf` . Read bellow for more info
73
84
*`https://github.com/adobe-apiplatform/apigateway/blob/master/api-gateway-config/environment.conf.d/api-gateway-upstreams.http.conf` which is automatically generated by the Marathon Discovery script.
@@ -83,12 +94,16 @@ docker run --name="apigateway" \
83
94
-e "LOG_LEVEL=info" \
84
95
adobeapiplatform/apigateway:latest
85
96
```
86
-
By default the remote config is checked for changes every `10s` and it's configurable through the `REMOTE_CONFIG_SYNC_INTERVAL` env variable.
97
+
By default the remote config is checked for changes every `10s`. This interval is configurable through the `REMOTE_CONFIG_SYNC_INTERVAL` env variable.
87
98
There are a few things to take into consideration when changing this value:
88
99
* How often the configs really change
89
100
* Cost. Some tools may make 1 API request per file to compare it. I.e. in S3 72 config files checked every `10s` costs `$7.46` but when checked every `30s` it's only `$2.4`, times number of GW nodes.
90
101
* Average time for an API Request. When reloading the GW the existing NGINX processes handling active connections are kept in the background until the request completes. So reloading the Gateway too fast may have the side effect of keeping too many processes running at the same time. This may, or may not be a problem but it's good to be aware of it.
91
102
103
+
#### Customizing the sync command
104
+
105
+
The sync command used for downloading the configuration files can be controlled via `REMOTE_CONFIG_SYNC_CMD` as well. This ENV VAR overrides the `REMOTE_CONFIG` one.
106
+
92
107
#### Resolvers
93
108
While starting up this container automatically creates the `/etc/api-gateway/conf.d/includes/resolvers.conf` config file using `/etc/resolv.conf` as the source.
94
109
To learn more about the `resolver` directive in NGINX see the [docs](http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver).
@@ -102,8 +117,8 @@ What's inside
102
117
103
118
| Module | Version | Details |
104
119
|--------------|------------|--------------|
105
-
|[Openresty](https://github.com/openresty/)| 1.9.7.3| Installed in `/usr/local/sbin/api-gateway`|
106
-
|[Openresty](https://github.com/openresty/) compiled `--with-debug`| 1.9.7.3| Installed in `/usr/local/sbin/api-gateway-debug` which enables [debugging log](http://nginx.org/en/docs/debugging_log.html)|
120
+
|[Openresty](https://github.com/openresty/)| 1.13.6.1| Installed in `/usr/local/sbin/api-gateway`|
121
+
|[Openresty](https://github.com/openresty/) compiled `--with-debug`| 1.13.6.1| Installed in `/usr/local/sbin/api-gateway-debug` which enables [debugging log](http://nginx.org/en/docs/debugging_log.html)|
107
122
|[Test Nginx](https://github.com/openresty/test-nginx)|[0.24](https://github.com/openresty/test-nginx/releases/tag/v0.24)| Useful for executing integration tests from the container. <br/> It's installed in `/usr/local/test-nginx-0.24/`. <br/> It's also used during Docker build to execute `make test` on lua modules. |
108
123
|[PCRE](https://sourceforge.net/projects/pcre/)|[8.37](https://sourceforge.net/projects/pcre/files/pcre/8.37/)| Enables PCRE JIT support |
0 commit comments