Can this proxy be used to route the request to available server #1080
-
Can this proxy be used, when I have multiple tcp clients trying to send request via proxy to multiple servers of same type associated with this proxy. Is it capable to route the request to the next available server. And in response path, can this proxy identify to whom I should give the response back? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Sorry, but it's unclear what exactly is that you are after. Can you expand on it? Best way to find out is to try the plugins and see what works for you https://github.com/abhinavsingh/proxy.py/tree/develop/proxy/plugin. |
Beta Was this translation helpful? Give feedback.
-
They are tcp clients, such as telnet. I have written my own proxy (load balancer) which does exactly what I wanted initially. Still I am thinking to extend it to support millions of connections with seamless user experience. |
Beta Was this translation helpful? Give feedback.
-
That's awesome. Indeed scaling will be another aspect for any codebase. With
That's it :). You can customize your implementation as necessary while using Lastly, do also check Let me know how it goes :) |
Beta Was this translation helpful? Give feedback.
That's awesome. Indeed scaling will be another aspect for any codebase. With
proxy.py
you can achieve it automagically. Before you dig into it, here is a recap to understand whats going on:Internally
proxy.py
is a TCP/UDP server. This core component is responsible for listening on one or several port (or sock files). It doesn't know about what functionality will run on-top of a listening server. It's job is to accept connections, delegate them to a worker class for handling the connection.By default,
--work-klass
flag points toproxy.http.HttpProtocolHandler
class. This class knows how to handle an incoming HTTP client connection (server or proxy is inferred at runtime and handled a…