Hi Tom,

On 11/16/13 8:09 AM, Tom van Neerijnen wrote:
Hi all

I'm building a simple TCP load balancer based on a code snippet from Glyph on SO: http://stackoverflow.com/questions/4096061/general-question-regarding-wether-or-not-use-twisted-in-tcp-proxy-project

It's served me well but I can't work out how to convert Glyphs round robin retrieval of the server endpoint into an async balancing decision in the buildProtocol method of the Factory. If I return a deferred here it fails with an AttributeError: Deferred instance has no attribute 'makeConnection'.
[SNIP]

Have you considered using https://pypi.python.org/pypi/txLoadBalancer as the basis for your load-balancer? It supports random, round-robin, least-connections, and weighted, so perhaps it would suit your needs.

Hope this helps,

L. Daniel Burr

_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to