Heartbeat+Haproxy实现负载均衡高可用

Haproxy+Heartbeat 高可用集群方案操作记录 本文档为Haproxy+Heartbeat 高可用集群方案线上操作手册,已经过测试可用!希望能帮助到有用到的朋友~ 立即下载
原创作品,允许转载,转载时请务必以超链接形式标明文章  原始出处 、作者信息和本声明。否则将追究法律责任。 http://jerry12356.blog.51cto.com/4308715/1858243

环境说明:

主机名 角色 IP地址
mylinux1.contoso.com heartbeat+haproxy

eth0:192.168.100.121

eth1:172.16.100.121

mylinux2.contoso.com heartbeat+haproxy

eth0:192.168.100.122

eth1:172.16.100.122

mylinux3.contoso.com web server 1 eth0:192.168.100.181
mylinux4.contoso.com web server 2 eth0:192.168.100.182

一、环境准备

在mylinux1和mylinux2上安装heartbeat,可以手动安装,当然也可以使用前面发布的一篇heartbeat脚本的博文,里面有heartbeat快速安装脚本。

然后在mylinux2上安装haproxy,并将mylinux1上的haproxy配置文件和启停脚本都拷贝到mylinux2上。

要保证mylinux1和mylinux2的heartbeat+haproxy环境一致。

1
2
3
4
5
6
7
8
9
10
11
12
[root@mylinux1 ~] # scp /etc/init.d/haproxy mylinux2:/etc/init.d/
root@mylinux2's password: 
Permission denied, please try again.
root@mylinux2's password: 
haproxy                                       100% 1567     1.5KB /s    00:00    
[root@mylinux1 ~] # scp /usr/local/haproxy/conf/haproxy.cfg mylinux2:/usr/local/haproxy/conf/haproxy.cfg
root@mylinux2's password: 
haproxy.cfg                                   100% 1194     1.2KB /s    00:00   
[root@mylinux2 haproxy] # ll /etc/init.d/haproxy 
-rwxr-xr-x 1 root root 1567 Oct  1 02:11  /etc/init .d /haproxy
[root@mylinux2 haproxy] # ll /usr/local/haproxy/conf/haproxy.cfg 
-rw-r--r-- 1 root root 1194 Oct  1 02:13  /usr/local/haproxy/conf/haproxy .cfg

二、修改heartbeat的资源文件

1
2
3
4
[root@mylinux1 ~] # tail -1 /etc/ha.d/haresources 
mylinux1.contoso.com IPaddr::192.168.100.120 /24/eth0  haproxy
[root@mylinux2 haproxy] # tail -1 /etc/ha.d/haresources 
mylinux1.contoso.com IPaddr::192.168.100.120 /24/eth0  haproxy

这里还是贴出两个heartbeat节点的ha.cf配置,如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
[root@mylinux1 ~] # egrep -v "#|^$" /etc/ha.d/ha.cf
debugfile  /var/log/ha-debug
logfile /var/log/ha-log
logfacilitylocal1
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport694
mcast eth1 225.0.0.1 694 1 0
auto_failback on
nodemylinux1.contoso.com
nodemylinux2.contoso.com
respawn hacluster  /usr/lib64/heartbeat/ipfail
[root@mylinux2 haproxy] # egrep -v "#|^$" /etc/ha.d/ha.cf 
debugfile  /var/log/ha-debug
logfile /var/log/ha-log
logfacilitylocal1
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport694
mcast eth1 225.0.0.1 694 1 0
auto_failback on
node    mylinux1.contoso.com
node    mylinux2.contoso.com
respawn hacluster  /usr/lib64/heartbeat/ipfail

三、启动heartbeat服务

1、首先在mylinux1和mylinux2上先关闭haproxy服务

1
2
3
4
[root@mylinux1 ~] # service haproxy stop
Stop haproxy successful.
[root@mylinux2 haproxy] # service haproxy stop
Haproxy is not running. Stop haproxy failed!

2、依次启动mylinux1和mylinux2上的heartbeat服务

1
2
3
4
5
6
[root@mylinux1 ~] # /etc/init.d/heartbeat start
Starting High-Availability services: INFO:  Resource is stopped
Done.
[root@mylinux2 haproxy] # /etc/init.d/heartbeat start
Starting High-Availability services: INFO:  Resource is stopped
Done.

四、测试haproxy的高可用

1、首先,检查mylinux1的状态

1
2
3
4
[root@mylinux1 ~] # ip a|grep 192.168.100.120
     inet 192.168.100.120 /24  brd 192.168.100.255 scope global secondary eth0
[root@mylinux1 ~] # service haproxy status
Haproxy (pid  3600) is running...

2、其次,检查mylinux2的状态

1
2
3
[root@mylinux2 haproxy] # ip a |grep 192.168.100.120
[root@mylinux2 haproxy] # service haproxy status
Haproxy is stopped.

3、查看监控界面

wKiom1fusjWzvOP8AAKGAPq71lk888.png-wh_50

五、测试故障切换

1、停止mylinux1上的heartbeat服务

1
2
[root@mylinux1 ~] # /etc/init.d/heartbeat stop
Stopping High-Availability services: Done.

2、检查mylinux1和mylinux2的状态

1
2
3
4
5
6
7
[root@mylinux1 ~] # ip a |grep 192.168.100.120
[root@mylinux1 ~] # service haproxy status
Haproxy is stopped.
[root@mylinux2 haproxy] # ip a |grep 192.168.100.120
     inet 192.168.100.120 /24  brd 192.168.100.255 scope global secondary eth0
[root@mylinux2 haproxy] # service haproxy status
Haproxy (pid  3997) is running...

3、查看监控页面

wKiom1fusybiVMthAAKLJ2hGum8420.png-wh_50

4、查看mylinux2上的heartbeat日志

[root@mylinux2 ~]# >/var/log/ha-log 

[root@mylinux2 ~]# tail -f /var/log/ha-log 

Oct 01 02:44:31 mylinux2.contoso.com heartbeat: [3534]: info: Received shutdown notice from 'mylinux1.contoso.com'.

Oct 01 02:44:31 mylinux2.contoso.com heartbeat: [3534]: info: Resources being acquired from mylinux1.contoso.com.

Oct 01 02:44:31 mylinux2.contoso.com heartbeat: [3655]: info: acquire local HA resources (standby).

Oct 01 02:44:31 mylinux2.contoso.com heartbeat: [3656]: info: No local resources [/usr/share/heartbeat/ResourceManager listkeys mylinux2.contoso.com] to acquire.

Oct 01 02:44:31 mylinux2.contoso.com heartbeat: [3655]: info: local HA resource acquisition completed (standby).

Oct 01 02:44:31 mylinux2.contoso.com heartbeat: [3534]: info: Standby resource acquisition done [all].

harc(default)[3681]:2016/10/01_02:44:31 info: Running /etc/ha.d//rc.d/status status

mach_down(default)[3698]:2016/10/01_02:44:31 info: Taking over resource group IPaddr::192.168.100.120/24/eth0

ResourceManager(default)[3725]:2016/10/01_02:44:31 info: Acquiring resource group: mylinux1.contoso.com IPaddr::192.168.100.120/24/eth0 haproxy

/usr/lib/ocf/resource.d//heartbeat/IPaddr(IPaddr_192.168.100.120)[3753]:       2016/10/01_02:44:31 INFO:  Resource is stopped

ResourceManager(default)[3725]:2016/10/01_02:44:31 info: Running /etc/ha.d/resource.d/IPaddr 192.168.100.120/24/eth0 start

IPaddr(IPaddr_192.168.100.120)[3878]:2016/10/01_02:44:32 INFO: Adding inet address 192.168.100.120/24 with broadcast address 192.168.100.255 to device eth0

IPaddr(IPaddr_192.168.100.120)[3878]:2016/10/01_02:44:32 INFO: Bringing device eth0 up

IPaddr(IPaddr_192.168.100.120)[3878]:2016/10/01_02:44:32 INFO: /usr/libexec/heartbeat/send_arp -i 200 -r 5 -p /var/run/resource-agents/send_arp-192.168.100.120 eth0 192.168.100.120 auto not_used not_used

/usr/lib/ocf/resource.d//heartbeat/IPaddr(IPaddr_192.168.100.120)[3852]:       2016/10/01_02:44:32 INFO:  Success

ResourceManager(default)[3725]:2016/10/01_02:44:32 info: Running /etc/init.d/haproxy  start

mach_down(default)[3698]:2016/10/01_02:44:32 info: /usr/share/heartbeat/mach_down: nice_failback: foreign resources acquired

mach_down(default)[3698]:2016/10/01_02:44:32 info: mach_down takeover complete for node mylinux1.contoso.com.

Oct 01 02:44:32 mylinux2.contoso.com heartbeat: [3534]: info: mach_down takeover complete.

Oct 01 02:45:02 mylinux2.contoso.com heartbeat: [3534]: WARN: node mylinux1.contoso.com: is dead

Oct 01 02:45:02 mylinux2.contoso.com heartbeat: [3534]: info: Dead node mylinux1.contoso.com gave up resources.

Oct 01 02:45:02 mylinux2.contoso.com heartbeat: [3534]: info: Link mylinux1.contoso.com:eth1 dead.

Oct 01 02:45:02 mylinux2.contoso.com ipfail: [3543]: info: Status update: Node mylinux1.contoso.com now has status dead

Oct 01 02:45:03 mylinux2.contoso.com ipfail: [3543]: info: NS: We are dead. :<

Oct 01 02:45:03 mylinux2.contoso.com ipfail: [3543]: info: Link Status update: Link mylinux1.contoso.com/eth1 now has status dead

Oct 01 02:45:04 mylinux2.contoso.com ipfail: [3543]: info: We are dead. :<

Oct 01 02:45:04 mylinux2.contoso.com ipfail: [3543]: info: Asking other side for ping node count.


本文出自 “IT小二郎” 博客,请务必保留此出处http://jerry12356.blog.51cto.com/4308715/1858243

【3D计算机视觉】从PointNet到PointNet++理论及pytorch代码 从PointNet到PointNet++理论及代码详解1. 点云是什么1.1 三维数据的表现形式1.2 为什么使用点云1.3 点云上以往的相关工作2. PointNet2.1 基于点云的置换不变性2.1.1 由对称函数到PointNet(vanilla)2.1.2 理论证明2.2 基于点云的旋转不变性2.3 网络总体结构2.4 实验结果和网络的鲁棒性2.5 代码解析3. PointNet++3.1... 阅读详情

相关推荐

J204B接口数据链路的建立

介绍J204B数据链路层的建立方式

QUACK_G的博客 6563

heartbeat+Haproxy多VIP负载均衡高可用

一、Haproxy简介在大型系统设计中用代理在负载均衡是最常见的一种方式,而相对靠谱的解决方案中Nginx、HAProxy、LVS、F5在各大场中用得比较普遍,各有各的优势和使用场景,本次讲解的主角是HAProxy。 HAProxy 提供高可用性、负载均衡以及基于 TCP 和 HTTP 应用的代理,支持虚拟主机,它是免费、快速并且可靠的一种解决方案。HAProxy 特别适用于那些负载特大的 web

Running_free的博客 2141

”COMSOL“竟然如此简单!我悟了!!

COMSOL Multiphysics具有强大的多物理场全耦合仿真分析功能、高效的计算性能,可以保证数值仿真的高度精确,已被广泛应用于各个学科领域,近年来运用COMSOL来解决电化学实际工程问题也越来越普遍。

C1012562281的博客 3456

haproxy+heartbeat的两种方案(注意,备服务器vip,正常haproxy启动方法)

主备模式方案一也就是也vip在哪里,haproxy就在哪里启动的主备模式。[root@BACKUP~]#cat/etc/ha.d/haresources #gaoservices #10.0.0.103www.lvnian.org MASTERIPaddr::10.0.0.103/24/eth0haproxyd [root@BACKUP~]#注意点:##h...

weixin_34194702的博客 322

MFC下使用C++操作Word文档

由于项目需求,在MFC环境下操作将数据和图片写入word文档,之前没有接触过,网上查阅了很多资料,终于把任务完成。理解的不是很透彻,但是这些东西应该够用了,写篇博客记录一下,以便以后再用到。 (1)VS环境下创建一个MFC应用程序,然后在项目上单击右键,选择 类向导-----添加类----类型库中的MFC类。在弹出的对话框中选择文件,位置选择office安装目录下的...

GIS_yuhua的博客 7589

CAPL通过lookupSignal和DBLookup获取DBC信号的属性信息

CAPL通过lookupSignal和DBLookup获取DBC信号的属性信息以及一些相关问题

天赐好车的博客 2898

heartbeat负载均衡详解

heartbeat高可用软件http://www.linux-ha.org/wiki/Main_Page1 heartbeat作用通过heartbeat将资源(IP)从一台已经故障的计算机快速转移到另一台正常运行的机器上继续提供服务,一般称为高可用.实际生产中应用场景,heartbeat功能和另一个高可用开源软件keepalive有相同之处。在我们生产中实际的业务应用有所区别。2 heartbea...

weixin_30840573的博客 750

大华 DSS 数字监控系统 itcBulletin SQL 注入漏洞复现

大华 DSs 数字监控系统是大华开发的一款安防视频监控系统,拥有实时监视、云台操作、录像回放、报警处理、设备管理等功能。大华 DSS存在SQL注入漏洞,攻击者 pota/services/itcBuletin 路由发送特殊构造的数据包,利用报错注入获取数据库敏感信息。攻击者除了可以利用 SQL注入漏词获取数据库中的信息例如,管理员后台密码、站点的用户人人信息)之外,甚至在高权限的情况可向服务器中写入木马,进一步获取服务器系统权限poc验证是否存在漏洞如果你想查询用户名和密码。

holyxp的博客 4009

heartbeat+haproxy

HAProxy提供高可用性、负载均衡以及基于TCP和HTTP应用的代理支持虚拟主机它是免费、快速并且可靠的一种解决方案。HAProxy特别适用于那些负载特大的web站点这些站点通常又需要会话保持或七层处理。HAProxy运行在当前的硬件上完全可以支持数以万计的并发连接。并且它的运行模式使得它可以很简单安全的整合进您当前的架构中 同时可以保护你的web服务器不被暴露到网络上。H...

weixin_34025051的博客 214

Python爬虫实战:抓取全球各国海关进出口数据的全流程教程

本文系统介绍了用Python采集全球各国海关进出口数据的完整流程,从数据源调研、技术选型,到代码实战、数据处理和存储,最后还拓展了进阶反爬和动态内容处理方法。希望这篇博文能帮助你掌握专业的数据采集技能,为后续数据分析和商业应用奠定坚实基础。

2201_76125261的博客 2367

【表面缺陷检测】基于yolov5的钢轨表面缺陷检测(附代码和数据集,Windows系统)

【表面缺陷检测】基于yolov5的钢轨表面缺陷检测(附代码和数据集,Windows系统)

学无止境、积少成多、厚积薄发 3994

Heartbeat + haproxy + MySQL 双主复制实现读写负载均衡及高可用

中间件简述、安装配置、功能测试、总结

wzy0623的专栏 2982

FAA机载电子硬件审查指南详解(评审和审查必备)

本咨询通告旨在协助认证机构、授权代表(包括组织授权)和申请人执行机载电子硬件评审(以下简称"硬件评审")。硬件评审的目的是评估机载电子硬件是否符合适航要求和建议的符合性方法(即RTCA/DO-254)。本工作辅助文件应作为评审过程中的参考工具使用。它不应被用作检查表,也不包含所有可能需要评审的情况。同样,本工作辅助文件也不是用来替代DO-254,而应与DO-254一起使用。此外,本工作辅助文件可能包含一些不适用于特定项目评估的问题。

qq_41854911的博客 617

高可用和负载均衡实现的相关软件,文章与对比 haproxy, nginx, keepalive, heartbeat, lvs

高可用开源方案 Keepalived VS Heartbeat对比 https://blog.csdn.net/yunhua_lee/article/details/9788433 DRBD安装配置、工作原理及故障恢复 https://blog.51cto.com/502245466/1298945 MySQL高可用性之Keepalived+Mysql(双主热备) https://blo...

tanyyinyu的博客 403

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

ubuntu10.04下haproxy+heartbeat配置高可用负载均衡(修改版|亲

ubuntu10.04下haproxy+heartbeat配置高可用负载均衡(修改版|亲 TIME:2011-03-31   已被阅读次 配置前提:ubuntu10.04 server版 ip及主机名设置: node1: 主机名:www1 ( HA01 ) eth0:  192.168.0.91        //对外IP地址 eth1:  192.168.1.11  

逆雪寒的天坑 1350

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

lvs+keepalived和haproxy+heartbeat区别

转载:http://23live.cn/server/lvs-keepalived-haproxy-heartbeat/ 最近一直在看一些高可用性的负载均衡方案,当然那些f5之类的硬件设备是玩不起也接触不到了。只能看这些for free的开源方案。 目前使用比较多的就是标题中提到的这两者,其实lvs和haproxy都是实现的负载均衡的作用,keepalived和heartbeat都是提高高

zhangxinrun的专栏 1万+

ubuntu10.04下haproxy+heartbeat配置高可用负载均衡

ubuntu10.04下haproxy+heartbeat配置高可用负载均衡(修改版|亲测绝对可行)配置前提:ubuntu10.04 server版ip及主机名设置:node1: 主机名:www1 ( HA01 )eth0: 192.168.0.91 //对外IP地址eth1: 192.168.1.11 //HA心跳使用地址node2: 主机...

weixin_34128237的博客 99

【linux】企业架构LB-服务器的负载均衡之LVS & HAProxy实现

【linux】企业架构LB-服务器的负载均衡之LVS & HAProxy实现

qq_35302220的博客 410

lvs+keepalived和haproxy+heartbeat keepalived heartbeat

转载:http://23live.cn/server/lvs-keepalived-haproxy-heartbeat/ 最近一直在看一些高可用性的负载均衡方案,当然那些f5之类的硬件设备是玩不起也接触不到了。只能看这些for free的开源方案。 目前使用比较多的就是标题中提到的这两者,其实lvs和haproxy都是实现的负载均衡的作用,keepalived和heartbeat都是提高高

ysdaniel的专栏 2058

配置Haproxy

一、安装Haproxy Haproxy的安装非常简单,从以下网址下载源码文件进行编译安装即可: http://haproxy.1wt.eu/ 然后解压缩源码包,我下载的是1.4.9的版本: tar-zxvfhaproxy-1.49.tar.gz cdhaproxy-1.4.9 makeTARGET=linux26PREFIX=/haproxy mak...

dianyi2646的博客 147

haproxy安装_使用HAProxy和Heartbeat进行负载平衡的高可用MySQL集群

您好,在本文中,我想分享一些从两个主MySQL节点构建高可用MySQL数据库集群的经验,具有基于HAProxy和Heartbeat的负载平衡和故障转移功能。在大多数现代项目中,数据库的可用性是生死攸关的问题。好的解决方案是从多个MySQL服务器创建一个分布式数据库集群,它可以处理负载平衡,故障转移功能和数据复制。此外,高负载下您可以拆分传入的请求。在这个例子中,我将展示从两个主节点创建一个MySQ...

weixin_30529023的博客 188

haproxy相关

http://www.gaojinbo.com/%E9%80%9A%E8%BF%87haproxy%E6%9E%84%E5%BB%BA%E5%BC%80%E6%BA%90%E8%B4%9F%E8%BD%BD%E5%9D%87%E8%A1%A1%E6%9E%B6%E6%9E%84%E5%B9%B3%E5%8F%B0.html http://www.javaeye.com/topic/443080 h...

weixin_33849215的博客 105

什么是集群负载均衡与高可用(有图详解)

前言 我们经常听说到负载均衡与高可用,那么这两个概念是什么意思呢,本文来简单的理解一下负载均衡与高可用。 什么是负载均衡 负载均衡:Load Balance,简称LB。负载均衡,顾名思义就是把前端客户的请求负载压力均衡的分摊到后台服务器中去,比如有一台负载均衡服务器,后台是3台web服务器,客户的请求就会被负载均衡服务器分摊到后台的3台web服务器上,如下图所示: 负载均衡,即LB,一般可以由硬件或软件来实现,硬件负载均衡产品有:F5、Netscaler、Radware、A10等,如下图所示: 软

MssGuo的博客 2333
上一篇: Haproxy配置http模式负载均衡
下一篇: Haproxy其他功能及配置
developerinit
博客等级 码龄18年 56粉丝 12原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址