English 中文(简体)
什么是使欧共体2例自动加入HAProxy的最佳做法?
原标题:What s the best practice for getting EC2 instances to join HAProxy automatically?

我们重新努力把我们的EC2结构扩大到我们想要管理我们自身负荷平衡的地方。 目前,我们拥有一系列由HAProxy配置的机器,以平衡基本负荷,但我们重新寻找最佳做法手段,让一个新案例在网上出现,并自动(或几乎自动)加入HAProxy。

Ideally, we d monitor load on our systems or rely on a few years worth of analytics data to work out a rouch schedule, and when we reach a threshold or scheduled time, have a process fire up a new instance, have that new node connect to a system on our HAProxy machine to write its hostname into the config and reload HAProxy so it becomes part of the pool.

We re considering Amazon s ELB once we grow big enough to need multiple zone coverage, but until then, we need a simple setup that can add/remove machines from HAProxy.

我知道那里有一些服务,我们可以支付这笔钱,但Scalr似乎把我们局限在非常具体的事例类型上,而像许多其他人一样,右尺度太昂贵,我们重新寻找我们自己的解决办法。

不幸的是,那些自食其力的人似乎对自己的进程毫不犹豫。

最佳回答

你们不需要过度思考这一解决办法。

你可以简单地把“会前”服务器放在你的HAProxy配置档案中。 他们似乎“倒数”,在你实际将其带上网上之前,不会收到任何要求。

例如,假设你只拥有5台在线机器,预计今后两年将有10台:

listen web *:80
    balance source
    server  web1 192.168.0.101:80 check inter 2000 fall 3
    server  web2 192.168.0.102:80 check inter 2000 fall 3
    server  web3 192.168.0.103:80 check inter 2000 fall 3
    server  web4 192.168.0.104:80 check inter 2000 fall 3
    server  web5 192.168.0.105:80 check inter 2000 fall 3
    server  web6 192.168.0.106:80 check inter 2000 fall 3
    server  web7 192.168.0.107:80 check inter 2000 fall 3
    server  web8 192.168.0.108:80 check inter 2000 fall 3
    server  web9 192.168.0.109:80 check inter 2000 fall 3
    server  web10 192.168.0.110:80 check inter 2000 fall 3

由于这种争执,你赢得了至少一年的重氧气或 any(除非你需要10多座,然后只增加100个,你还要打一平)。

如果你把100个服务器重新添入你的人才库,你也可以写出快速的剪辑,以自动生成这一配置。

问题回答

暂无回答




相关问题
Access particular server behind load-balanced tomcat

I m building production configuration where 2 tomcats are sitting behind the apache with load-balancer and mod_proxy. What I need is the script which checks whether particular instance of tomcat is ...

IIS 6.0 Load Balancing and ASP.NET In-Proc Session

We have three web servers in our web farm that are load balanced using the Network Load Balancing Manager in Windows 2003. The sites that run on these boxes use In-Proc ASP.NET session. Our ...

通过Java EE进行集群和负荷平衡

我想通过利用Java EE来发展集群和负荷平衡,我想在后端使用两个Tocats,如果我提出申请后,它应根据负荷向目录提出请求。

Assets Management in a clustered environment

I have a content management system running on a web server, that among others allows the user to upload assets like images, files, etc to the server. The problem i have is that there will be 2 ...

BizTalk server problem

we have a biztalk server (a virtual one (1!)...) at our company, and an sql server where the data is being kept. Now we have a lot of data traffic. I m talking about hundred of thousands. So I m ...

Outgoing load balancer

I have a big threaded feed retrieval script in python. My question is, how can I load balance outgoing requests so that I don t hit any one host too often? This is a big problem for feedburner, ...

热门标签