Unverified Commit f1b95b86 authored by dawrakaushal's avatar dawrakaushal Committed by GitHub
Browse files

Merge pull request #19 from deliveroo/ROO-2237/custom_timeout

[ROO-2237] Adding PROXY_TIMEOUT as an optional parameter to configure a custom timeout
parents 7f595108 6d663055
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
# `nginx-sidecar` changelog

## 0.3.8

- Enabling the support of custom timeout for proxy requests
- New variable is: PROXY_TIMEOUT- it sets proxy_connect_timeout, proxy_send_timeout, proxy_read_timeout values. (default: 60s)

## 0.3.7

- Enabling ngnix status for detailed monitoring.
+6 −0
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@ We've enabled `http_stub_status_module` access to help with monitoring integrati
- `NGINX_STATUS_PORT` (default `81`) a port to run the status module on
- `NGINX_STATUS_ALLOW_FROM` (default `all`) IP, CIDR, `all` for the nginx config's `allow` statement (http://nginx.org/en/docs/http/ngx_http_access_module.html)

## Optional Requirements
 - PROXY_TIMEOUT sets proxy_connect_timeout, proxy_send_timeout, proxy_read_timeout values. (default: 60s)

## Example

In your `.hopper/config.yml`:
@@ -65,6 +68,9 @@ services:
          value: '18081'
        - name: NGINX_STATUS_ALLOW_FROM
          value: '172.0.0.0/8'
        # If you want a custom timeout for the request
        - name: PROXY_TIMEOUT
          value: '10s'
        
        # If your datadog agent has Autodiscovery enabled, you can provide additional docker labels
        # in order to expose them
+1 −1
Original line number Diff line number Diff line
0.3.7
0.3.8
+6 −0
Original line number Diff line number Diff line
@@ -64,6 +64,12 @@ http {
             application/javascript application/json
             application/atom+xml;

  # timeout settings when proxying request to a server upstream
  # nginx default values for these can be high for your app needs so it is configurable
  proxy_connect_timeout <PROXY_TIMEOUT>;
  proxy_send_timeout <PROXY_TIMEOUT>;
  proxy_read_timeout <PROXY_TIMEOUT>;

  # According to the HTTP standard, headers with underscores are perfectly valid.
  # However, nginx defaults to dropping headers containing underscores, as they
  # might introduce ambiguities when mapping headers to CGI variables.
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ set -ex
  -e "s/<APP_HOST>/${APP_HOST:-app}/g" \
  -e "s/<APP_PORT>/${APP_PORT}/g" \
  -e "s/<CLIENT_BODY_BUFFER_SIZE>/${CLIENT_BODY_BUFFER_SIZE:-8k}/g" \
  -e "s:<PROXY_TIMEOUT>:${PROXY_TIMEOUT:-60s}:g" \
  /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf

# Wait for the application to start before accepting ALB requests.