nginx实现unigui群集
nginx实现unigui群集
在笔者写此文的时候,UNIGUI1.50.x的版本已经发布,其提供的HyperServer已经支持群集。
有网友还专门为此做了群集方面的测试:

从上图可以看出:群集总共开了51个UNIGUI服务程式,总共有13357个客户端(sessions)连接,并且如此多的连接还操作正常。足可见HyperServer的强大。
HyperServer虽然好用,却只有UNIGUI最新版本才提供。
而NGINX做群集,却可以适用于所有UNIGUI的版本。
NGINX支持多种群集的方式,此处使用ip_hash实现UNIGUI群集。
1)下载NGINX FOR WINDOWS版本
http://nginx.org/en/download.html
2) 在服务器上开启多个unigui服务程式,每个程式须绑定不同的PORT。
3)配置nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include 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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
upstream cxg {
ip_hash;
server 47.106.93.126:7777;
server 47.106.93.126:9998;
}
server {
listen 9999;
server_name 47.106.93.126;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
proxy_pass http://cxg;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
4)开启nginx
start nginx
nginx -s reload
5) 浏览器打开:http://47.106.93.126:9999/
即可正常访问
nginx实现unigui群集的更多相关文章
- nginx做TCP代理实现群集
nginx做TCP代理实现群集 nginx从版本1.9开始,既能做HTTP代理,又能做TCP代理,这就非常完美了. 配置nginx.conf. 为了简单起见,笔者故意去掉了HTTP代理配置部分,只保留 ...
- Nginx+Tomcat+Session 高性能群集搭建
随着IT行业的发展,linux服务器在企业中应用广泛,人们对linux上的应用服务要求也越来越高,早先的apache服务器.apache有优点也 有不足,apache渐渐不能满足人们的要求,目前ngi ...
- Nginx+Tomcat负载均衡、动静分离群集
Nginx+Tomcat负载均衡.动静分离群集 目录 Nginx+Tomcat负载均衡.动静分离群集 一.Tomcat 1. Tomcat简介 2. Tomcat重要目录 二.Nginx负载均衡原理 ...
- Nginx+Tomcat负载均衡群集
一.Nginx负载均衡原理 目前很多大型网站都应用Nginx服务器作为后端网站程序的反向代理及负载均衡器,提升整个站点的负载并发能力 Nginx负载均衡是通过反向代理实现的 二.部署Tomcat 本案 ...
- 关于磁盘冗余阵列、热备、群集、负载均衡、云计算、F5、Nginx等的概念和基本原理
在系统部署实施过程中,客户往往会关注系统的可用性方面的指标. 对于一个具备高可用性的系统来说, 多机部署方案是必不可少的. 我们这个知识分享,就从多个不同层面来介绍多机部署方案. ---------- ...
- 年终培训关于磁盘冗余阵列、热备、群集、负载均衡、云计算、F5、Nginx等的概念和基本原理
在系统部署实施过程中,客户往往会关注系统的可用性方面的指标. 对于一个具备高可用性的系统来说, 多机部署方案是必不可少的. 我们这个知识分享,就从多个不同层面来介绍多机部署方案. ---------- ...
- nginx反向代理docker registry报”blob upload unknown"解决办法
问题症状:keepalived+nginx反向代理后端docker registry群集时,使用docker客户机向registry push镜像时出现 "blob upload unkno ...
- nginx 基础文档
Nginx基础 1. nginx安装 2. nginx 编译参数详解 3. nginx安装配置+清缓存模块安装 4. nginx+PHP 5.5 5. nginx配置虚拟主机 6. ngi ...
- apache httpd, nginx, tomcat, jboss
web上的server都叫web server,但是大家分工也有不同的. nginx常用做静态内容服务和代理服务器(不是你FQ那个代理),直面外来请求转发给后面的应用服务(tomcat,django什 ...
随机推荐
- Luogu 2216[HAOI2007]理想的正方形 - 单调队列
Solution 二维单调队列, 这个数组套起来看得我眼瞎... Code #include<cstdio> #include<algorithm> #include<c ...
- Ubuntu12.04下Qt连接MySQL数据库
本文介绍在Ubuntu12.04 (64 bit) 下使用Qt 4.8.2连接MySQL(Ver 14.14 Distrib 5.5.43)数据库. 1.安装 Qt 和 MySQL 若未安装以上软件, ...
- div同时使用两个class
<p class="con hide">...</p> 1:使用空格分割 2:这个段落将同时应用这两个 class 制定的规则 3:如果二者有重叠,后者覆盖 ...
- R及Rstudio 的使用建议
对于新人来说,进行R的学习时,通常会发现一般的教程都是让大家在交互环境下使用R. 但是这有一些缺点,比如在交换环境下,出现错误是难以撤销的,有的时候甚至需要重头做起.尤其是在Rstudio的交互环境下 ...
- 将Struts放入spring框架中
第一步:写好ACtion package com.inspur.actions; import javax.servlet.http.HttpServletRequest;import javax.s ...
- idea maven编译jdk报错
<!--自己添加的,用来控制maven编译时的jdk版本--> <plugins> <plugin> <groupId>org.apache.maven ...
- CentOS下利用mysqlbinlog恢复MySQL数据库
如果不小心对数据库进行误操作,而又没有及时备份怎么办?这恐怕是广大的coder经常遇到的一类问题.我今天就因为不小心删除了某个数据库,但最后的备份是1个礼拜前的,唯一能解决的办法就是通过mysqlbi ...
- day10作业—(闭包迭代器递归)
补充:一个星号的 打散和聚合 a, b , *c = [1,2, 1,4] print( a , b , *c) #1 2 1 4 print(a, b, c) #1 2 [1, 4] *c , = ...
- 2019.01.24 bzoj3125: CITY(轮廓线dp)
传送门 题意简述:给一个n∗mn*mn∗m的网格图,有的格子不能走,有的格子只能竖着走,有的格子只能横着走,问用一条回路覆盖所有能走的格子的方案数. 思路: 就是简单的轮廓线dpdpdp加了一点限制而 ...
- Amount of Degrees(数位dp)
题目链接:传送门 思路:考虑二进制数字的情况,可以写成一个二叉树的形式,然后考虑区间[i……j]中满足的个数=[0……j]-[0……i-1]. 所以统计树高为i,中有j个1的数的个数. 对于一个二进制 ...