[BangPypers] Fwd: How to do clustering in python.

Srinath g.s.srinath89 at gmail.com
Mon Sep 30 14:54:27 CEST 2013


Assuming your service can be run on multiple servers,

There are many ways to do load balancing.

1) If you are accessing the server with a name, simple way would be to set
DNS TTL low and use DNS in weighted round robin.

2) You can set up HAProxy with heartbeat.

3) If you have to write on yourself,  you can try using zeromq as per put
here http://zguide.zeromq.org/py:lbbroker3 (I haven't tried this) .

http://about.me/srinathgs
I write code @ Alamut
Srinath G S



On Mon, Sep 30, 2013 at 6:10 PM, Baiju M <baiju.m.mail at gmail.com> wrote:

> On Mon, Sep 30, 2013 at 4:37 PM, uday sankar <sankar.uday at gmail.com>
> wrote:
> > Hi,
> >
> > I have a engine built in python. I implemented a webserver in python it
> > will listen to the request sent and will responsed back with the
> necessary
> > result. Now the problem is that I am able to run this engine in one node,
> > if this node goes down engine will go down and we will not be able to run
> > the application. Is there any way if one node goes down other node will
> > process the request. How we can implement clustering and load balancing
> in
> > python?. Please guide me how we can do this.
>
> If the protocol is HTTP, you can use mod_proxy_balancer:
> https://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html
>
> --
> Baiju M
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>


More information about the BangPypers mailing list