forbole / big-dipper-2.0-cosmos

https://bigdipper.live
Apache License 2.0
142 stars 332 forks source link

Load-balanced Explorers Do Not Load Properly (NGINX) #381

Closed lightiv closed 3 years ago

lightiv commented 3 years ago

Load-balancing Big-Dipper 2.0

I have ran into an issue where the initial splash screen presents but then the site does not continue to load. I verified this by proxying two instances of JunoScan and then two other Big Dipper 2.0 explorers which exhibit the same issue. If you keep hitting refresh you will see the splash screen switch between, Gravity Bridge and Desmos:

https://junoonakash.skynetexplorers.com/

rav-11 commented 3 years ago

Hi @lightiv, please can you share your nginx version and config?

lightiv commented 3 years ago

nginx version: nginx/1.18.0 (Ubuntu) built with OpenSSL 1.1.1f 31 Mar 2020

##
# Set Rate Limiting (DDoS protection)
##

#        limit_req_zone $binary_remote_addr zone=req_zone:10m rate=5r/s;

# This is the internal server behind the proxy
        upstream bdipper_node {
#          least_conn;

           server 45.132.245.56:3000;
           server 193.26.156.32:3000;
        }

        map $http_upgrade $connection_upgrade {
          default upgrade;
          '' close;
        }

# This is the public facing listening server AND configures SSL for the website
        server {
          listen 443 ssl;
            server_name         *.skynetexploreres.com;
            ssl_certificate     /etc/ssl/certs/....crt;
            ssl_certificate_key /etc/ssl/private/....key;

          location / {

#            limit_req zone=req_zone burst=20 nodelay;

            proxy_pass http://bdipper_node/;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_set_header Host $host:443;
          }
        }

# This redirect http to https
        server  {
          listen 80 ;
          return 301 https://$host$request_uri;
        }
rav-11 commented 3 years ago

I am unable to reproduce this issue with this config/version. We have multiple instances of big dipper running behind nginx proxies with similar configs and do not see this on any of them. In browser dev tools I can see some 404s on js scripts which I think are related, think the cause is probably related to your build or local to your setup so will close this issue.

lightiv commented 3 years ago

Thanks