Open mswertz opened 1 year ago
In PR #544 I made note for load balancing now moved here
Below sketchy docker-compose.yml file which could be added to either dev or ci from mentions PR
version: '3'
services:
armadillo:
image: armadillo:latest
rock:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
rockB1:
image: rock:latest
rockB2:
image: rock:latest
rockB3:
image: rock:latest
http {
upstream backend {
ip_hash;
server rockB1:8080;
server rockB2:8080;
server rockB3:8080;
}
server {
listen 80;
location / {
proxy_pass http://backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header JSESSIONID $cookie_JSESSIONID;
}
}
}
I take it request forwarding will need to have Session Affinity.
The sticky
is not available in image: nginx:latest
and learned ip_hash
is not really an option (most request will probably come from same institute IP address).
Using armadillo-compose.zip
from pre release v4.0.2 I can run release-test.R
using changed docker-compose.yml
.
HA Proxy may be an alternative for nginx.sticky
# ./docker-compose.yml
...
haproxy:
image: haproxy:2.3
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
ports:
- 8081:80
depends_on:
- rockB1
- rockB2
- rockB3
and
This is WIP as it errors on rock servers not ready so we need health check on them
Motivation: if many users are using same profile then the Rock instance gets overloaed Solution: have sticky load balancing
Figuring out
/r/session/<session_id>[?/.*]
?