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什 ...
随机推荐
- python_docx制作word文档详细使用说明【转】
目前网上对这一个库的介绍得很少,很零散,所以很多功能我是尽量参考其官网,但是官网上面很多功能目前只有说明文档,而代码并还没有及时更新,以至于按照官网上面做了,python却报错.比如:自定义表格的 ...
- 异常Throwable
1.有效处理java异常三原则 java中异常提供了一种识别及响应错误情况的一致性机制,有效地异常处理能使程序更加健壮,易于调试.异常之所以是一种强大的调试手段,在于其回答了以下三个问题: 什么出了错 ...
- wepy中页面的跳转
1.在pages中创建好页面之后,需要在app.wpy中的config中配置好页面路由:2.如果跳转的按钮在page页面中 this.$navigate({url:"content" ...
- MVVM Light 笔记 - snippet
RelayCommand有8个,看似很多,其实就是几个变化的组合: 1.是否Generic 2. 执行是使用lambda表达式还是method 3.是否有CanExecute 这些都在源代码Snipp ...
- [Oracle]ORA-14400:插入的分区关键字未映射到任何分区
今天在使用测试库的时候发生ORA-14400:inserted partition key does not map to any partition 解决过程: 经过百度,发现出现ORA-14400 ...
- html--笔记day03
html--笔记day03 1.结构标记 1.<header>元素 <header></header> ==> <div id="header ...
- Hadoop3集群搭建之——安装hadoop,配置环境
接上篇:Hadoop3集群搭建之——虚拟机安装 下篇:Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoop3集群搭建之——hbase安装及简单操作 上篇已 ...
- 2018.11.04 NOIP训练 小水塘(并查集)
传送门 这是复习普及组的时候做过的题了. 之前一直觉得很难码没有去做. 现在发现可以用并查集直接水过去. 其实就是把题目中说的连通的部分的面积用带权并查集维护一下就行了. 代码: #include&l ...
- Mat补充
Mat的创建 1.使用Mat的构造函数 Mat test(2,2,CV_8UC3,Scalar(0,0,255)); 2.使用Mat的构造函数 int sizes[3] = {2,2,2}; Mat ...
- windows下Oracle数据库完全删除
1.1 停止所有oracle的服务 1.2 删除安装路径 app及其下所有文件 1.3 删除注册表 regedit 进入 在下列列表中找到与oracle相关的注册表项删除 1.HKEY_L ...