Skip to content

Commit

Permalink
Merge pull request #171 from hubmapconsortium/yuanzhou/cells-gateway
Browse files Browse the repository at this point in the history
Yuanzhou/cells gateway
  • Loading branch information
yuanzhou authored Jan 28, 2022
2 parents 7598c43 + c22bf1b commit 24830a2
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 10 deletions.
2 changes: 1 addition & 1 deletion hubmap-auth/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def get_status_data():
FILE_ASSETS_STATUS = 'file_assets_status'
BRANCH = 'branch'
COMMIT = 'commit'
POSTGRES_CONNECTION = 'Postgres connection'
POSTGRES_CONNECTION = 'postgres_connection'

# All API services have api_auth status (meaning the gateway's API auth is working)
# We won't get other status if api_auth fails
Expand Down
2 changes: 1 addition & 1 deletion hubmap-auth/src/templates/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h2>CELLS API</h2>

<!-- Need to update this to use "cells_api.postgres_connection" once Matt redeploys the corresponding tweaks -->
{% if data.cells_api["Postgres connection"] %}
<p class="pl-4">Postgres Connection: {{ data.cells_api["Postgres connection"] }}</p>
<p class="pl-4">Postgres Connection: {{ data.cells_api.postgres_connection }}</p>
{% endif %}

{% endif %}
Expand Down
7 changes: 7 additions & 0 deletions nginx/conf.d-dev/portal-ui.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ server {
# gzip_http_version sets the minimum HTTP version of a request required to compress a response to 1.1 by default.
# proxy_http_version needs to be >= that, but is 1.0 by default.
proxy_http_version 1.1;

# Due to cells-api slowness
# Increase timeout to 10 minutes until a real solution is ready
proxy_connect_timeout 600;
keepalive_timeout 600 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
}

}
Expand Down
16 changes: 8 additions & 8 deletions nginx/conf.d-prod/cells-api.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ server {
# Only the PROD version of cells api is routed by gateway
# The cells api on DEV and TEST are running on their own nginx instances, no STAGE version
# Calls to the PROD version of cells api (cells.api.hubmapconsortium.org) come to
# gateway directly and get forwarded to private IP 172.31.7.108 (cells-internal.api.hubmapconsortium.org)
# The cells api PROD is exposed on port 5000 via uwsgi
uwsgi_pass uwsgi://172.31.7.108:5000;
include uwsgi_params;
uwsgi_param HTTP_X_FORWARDED_PROTO $scheme;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_read_timeout 600s;
uwsgi_send_timeout 600s;
# gateway directly and get forwarded to their nginx gateway/load balancer http://cells-gateway.cmu.hubmapconsortium.org (no https)
proxy_pass http://cells-gateway.cmu.hubmapconsortium.org;

# Increase timeout to 10 minutes until a real solution is ready
proxy_connect_timeout 600;
keepalive_timeout 600 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
}

}
7 changes: 7 additions & 0 deletions nginx/conf.d-prod/portal-ui.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ server {
# gzip_http_version sets the minimum HTTP version of a request required to compress a response to 1.1 by default.
# proxy_http_version needs to be >= that, but is 1.0 by default.
proxy_http_version 1.1;

# Due to cells-api slowness
# Increase timeout to 10 minutes until a real solution is ready
proxy_connect_timeout 600;
keepalive_timeout 600 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
}

}
Expand Down
7 changes: 7 additions & 0 deletions nginx/conf.d-stage/portal-ui.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ server {
# gzip_http_version sets the minimum HTTP version of a request required to compress a response to 1.1 by default.
# proxy_http_version needs to be >= that, but is 1.0 by default.
proxy_http_version 1.1;

# Due to cells-api slowness
# Increase timeout to 10 minutes until a real solution is ready
proxy_connect_timeout 600;
keepalive_timeout 600 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
}

}
Expand Down
11 changes: 11 additions & 0 deletions nginx/conf.d-stage/prod-portal-ui.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ server {
# (Plain "$host" does not include port.)
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;

# gzip_http_version sets the minimum HTTP version of a request required to compress a response to 1.1 by default.
# proxy_http_version needs to be >= that, but is 1.0 by default.
proxy_http_version 1.1;

# Due to cells-api slowness
# Increase timeout to 10 minutes until a real solution is ready
proxy_connect_timeout 600;
keepalive_timeout 600 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
}

}
7 changes: 7 additions & 0 deletions nginx/conf.d-test/portal-ui.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ server {
# gzip_http_version sets the minimum HTTP version of a request required to compress a response to 1.1 by default.
# proxy_http_version needs to be >= that, but is 1.0 by default.
proxy_http_version 1.1;

# Due to cells-api slowness
# Increase timeout to 10 minutes until a real solution is ready
proxy_connect_timeout 600;
keepalive_timeout 600 600;
proxy_read_timeout 600;
proxy_send_timeout 600;
}

}
Expand Down

0 comments on commit 24830a2

Please sign in to comment.