Details
-
Type:
Story
-
Status: Invalid
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: webserv
-
Labels:None
-
Story Points:4
-
Team:Data Access and Database
Description
We want to have a generic reverse proxy set up for all web services using an nginx container.
This will allow us two things:
1. The ability to decouple imgserv, dbserv, metaserv, and future *servs
2. The ability to potentially scale requests in a round-robin fashion to multiple machines, if necessary, thanks to REST semantics.
The decoupling of imgserv, dbserv, and metaserv will be performed in a different story
Attachments
Issue Links
- mentioned in
-
Page Loading...
user nginx;
worker_processes 8;
error_log /var/log/nginx/error.log;
pid /var/run/nginx/nginx.pid;
events {
worker_connections 2048;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for";
access_log /var/log/nginx16/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
gzip on;
server_names_hash_bucket_size 64;
types_hash_max_size 2048;
types_hash_bucket_size 64;
proxy_buffer_size 64k;
proxy_buffers 4 128k;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
send_timeout 900;
# Don't check request entity size (allows large uploads)
client_max_body_size 0;
proxy_cache_path /tmp/nginx levels=1:2 keys_zone=imgcache:10m inactive=60m;
include /etc/nginx/sites-enabled/*.conf;
}
Where a *serv, under sites-enabled (e.g. /etc/nginx/sites-enabled/qserv-dax01.conf), could be configured similar to this:
qserv-dax01.conf
location / {
proxy_pass http://qserv-dax01:5000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
}