node-open-mining-portal icon indicating copy to clipboard operation
node-open-mining-portal copied to clipboard

Single pool with multiple NOMP servers

Open mabbas1975 opened this issue 8 years ago • 2 comments

I am wondering if it possible to run single pool in multiple NOMP servers, and if it possible to share the same MPOS database between multiple NOMP servers

mabbas1975 avatar Mar 12 '18 11:03 mabbas1975

It is possible. Just spawn multiple nodes and connect to the same database.

devnull-ed avatar Mar 14 '18 05:03 devnull-ed

To add to this idea, use NGINX reverse proxy to load balance to all your servers:

#
# POOL SERVER
#
upstream pool-http-server {
        server 10.1.96.1:8080 weight=3; # POOLNODE 1
        server 10.1.96.2:8080 weight=1; # POOLNODE 2
        server 10.1.96.3:8080 weight=1; # POOLNODE 3
}
server {	

        server_name pool.steaknode.easyx.cc; # managed by Certbot

        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 X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Ssl on;

        location / {

                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $host;

                proxy_pass http://pool-http-server;

                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";

        }


	listen 8079;
        listen [::]:8079;

    listen [::]:443 ssl; # managed by Certbot
    listen 443 ssl; # managed by Certbot

    ssl_certificate /etc/letsencrypt/live/steaknode.easyx.cc/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/steaknode.easyx.cc/privkey.pem; # managed by Certbot

    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

That way the load can be balanced for the HTTP server.

Then you just have to tell people what the second and third stratum addresses are.

mooleshacat avatar Jun 15 '20 09:06 mooleshacat