1. Install nginx package

2. edit nginx configuration file

[root@ip- nginx]# more nginx.conf

user  nginx;
worker_processes auto; error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid; events {
worker_connections ;
} http {
include /etc/nginx/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 /var/log/nginx/access.log main; sendfile on;
#tcp_nopush on; keepalive_timeout ; #gzip on; include /etc/nginx/conf.d/*.conf;
} # TCP/UDP proxy and load balancing block stream {
# Example configuration for TCP load balancing upstream stream_ota {
zone tcp_servers 64k;
server 10.xx.xx.32:22;
server 10.xx.xx.12:22;
} server {
listen 2222;
status_zone tcp_server;
proxy_pass stream_ota;
error_log /var/log/nginx/dgram-2222.log debug;
}
}

3. Start service

Nginx support TCP Load balance的更多相关文章

  1. LB(Load balance)负载均衡集群--{LVS-[NAT+DR]单实例实验+LVS+keeplived实验} 菜鸟入门级

    LB(Load balance)负载均衡集群 LVS-[NAT+DR]单实例实验 LVS+keeplived实验 LVS是Linux Virtual Server的简写,意即Linux虚拟服务器,是一 ...

  2. Using load balance for thrift servers

    Software load balance .Nginx(http://nginx.org) 1.Install nginx download source code from http://ngin ...

  3. Oracle RAC 服务器端连接负载均衡(Load Balance)

    Oracle RAC服务器端的负载均衡是根据RAC中各节点的连接负荷数情况,将新的连接请求分配到负荷最小的节点上去.当数据库处于运行时,RAC中各节点的PMON进程每3秒会将各自节点的连接负荷数更新到 ...

  4. Oracle RAC 客户端连接负载均衡(Load Balance)

    实现负载均衡(Load Balance)是Oracle RAC最重要的特性之一,主要是把负载平均分配到集群中的各个节点,以提高系统的整体吞吐能力.通常情况下有两种方式来实现负载均衡,一个是基于客户端连 ...

  5. Nginx基于TCP/UDP端口的四层负载均衡(stream模块)配置梳理

    通过我们会用Nginx的upstream做基于http/https端口的7层负载均衡,由于Nginx老版本不支持tcp协议,所以基于tcp/udp端口的四层负载均衡一般用LVS或Haproxy来做.至 ...

  6. Flume 高可用配置案例+load balance负载均衡+ 案例:日志的采集及汇总

    高可用配置案例 (一).failover故障转移 在完成单点的Flume NG搭建后,下面我们搭建一个高可用的Flume NG集群,架构图如下所示: (1)节点分配 Flume的Agent和Colle ...

  7. OpenStack Neutron 之 Load Balance

    OpenStack Neutron 之 Load Balance 负载均衡(Load Balance)是 OpenStack Neutron 支持的功能之一.负载均衡能够将网络请求分发到多个实际处理请 ...

  8. hue的load balance

    参考: hue的load balance官网: https://www.cloudera.com/documentation/enterprise/6/6.2/topics/hue_use_add_l ...

  9. Server Data Synchronization Via Linux rsync、rsync+inotify Between Load Balance Server

    目录 . 远程文件同步的应用场景 . rsync+crontab . rsync+inotify 1. 远程文件同步的应用场景 在负载均衡集群的应用场景中,往往在多台web server的前端有一个提 ...

随机推荐

  1. UVA11988 Broken Keyboard (a.k.a. Beiju Text)【数组模拟链表】

    参考:https://blog.csdn.net/lianai911/article/details/41831645 #include <iostream> #include <c ...

  2. P3305 [SDOI2013]费用流

    题目描述 Alice和Bob在图论课程上学习了最大流和最小费用最大流的相关知识. 最大流问题:给定一张有向图表示运输网络,一个源点S和一个汇点T,每条边都有最大流量. 一个合法的网络流方案必须满足: ...

  3. HBase import tsv,csv File

    一,HBase中创建table 表(liupeng:test)并创建 info ,contect 列簇 hbase(main):258:0> create "liupeng:Test& ...

  4. mysql用命令创建用户创建数据库设置权限

     1.create database bbs; //创建数据库 2.create user bbs IDENTIFIED by 'bbs';  //创建用户bbs和登录密码bbs 3.grant AL ...

  5. dfs Gym - 100989L

    AbdelKader enjoys math. He feels very frustrated whenever he sees an incorrect equation and so he tr ...

  6. 【转】手把手教你:Ubuntu14+apache2+django1.7+python2.7下网页/网站部署

    本人亲自尝试了网上众多的部署网页/网站方法,绝大多数都未能试验成功,这次的项目光部署这块遇到了很多问题,大概耗费了我一个星期. 本着:王道论坛中的赠人玫瑰,手留余香的精神.我把自己一路所走的历程发布出 ...

  7. 如何搭建SBT编译Scala开发的Android工程

    作者:戚明峰 最近接触了shadowsocks的Android客户端项目源码(https://github.com/shadowsocks/shadowsocks-android),刚好这个项目是使用 ...

  8. Django笔记 —— 模板高级进阶

    最近在学习Django,打算玩玩网页后台方面的东西,因为一直很好奇但却没怎么接触过.Django对我来说是一个全新的内容,思路想来也是全新的,或许并不能写得很明白,所以大家就凑合着看吧- 本篇笔记(其 ...

  9. 项目总结(二)->一些常用的工具浅谈

    程序员是否应该沉迷于一个编程的世界,为了磨砺自己的编程技能而两耳不闻窗外事,一心只为写代码:还是说要做到各有涉猎,全而不精.关于这点每个人心中都有一套自己的工作体系和方法体系. 我一直认为,程序员你首 ...

  10. Spark实战练习02--处理分隔符

    一.场景 devicestatus.txt 文件包含了来自于不同运营商的移动设备的数据,不同的数据格式,包括设备ID.当前状态.位置等等.注意,该文件中的记录具有不同的字段分隔符:一些使用逗号,一些使 ...