Bug 25304 - Should stop hardcoding SOCKS5 proxies and use our own round robin server instead
Summary: Should stop hardcoding SOCKS5 proxies and use our own round robin server instead
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-26 09:45 UTC by Guillaume Desmottes
Modified: 2009-12-07 03:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2009-11-26 09:45:48 UTC
+++ This bug was initially created as a clone of Bug #21151 +++

This branch removes all the hardcoded proxies and replace them by our future DNS round robin server.
http://git.collabora.co.uk/?p=user/cassidy/telepathy-gabble;a=shortlog;h=refs/heads/proxy-tp-im


Before merging it we should improve the bytestream factory to work better with the
DNS round robin server:
- don't remove proxy from the list once the query has been sent
- be sure to not add twice the same (jid, host, port) to our list of discovered
proxies
- remove old proxies from the list after we disocevered $N newer proxies
Comment 1 Guillaume Desmottes 2009-11-27 03:48:09 UTC
(In reply to comment #0)
> - don't remove proxy from the list once the query has been sent

I'm not sure what's the best algorithm for that. We could do something like:

- first time we need SOCKS5 proxies, send $N requests to proxies from the fallback list.  If needed reuse the same ones.
- Let's say you received $S1 successful replies from those.
- Next time we need proxies, send 1 (or $N - $S1 ?) queries (here again, reuse if needed).
- Let's say you received $S2 successful replies from those.
- Drop the oldest proxies to keep the latest $M discovered (with $N == $M?)

This should work pretty well with our round robin server as we'll always get a pool of working proxies and will continue to refresh it during the lifetime of the connection.

But that won't work so well for non round robin server. Either they are working and we'll continue to receive the same host from them. Either they are not and there is no point to continue to flood them with request. This will lead to unnecessary traffic to the proxies which is a bit of a shame as we just reduced it.

Maybe the proxy.telepathy.im should be hardcoded somewhere and handled differently?
Comment 2 Guillaume Desmottes 2009-11-27 07:07:46 UTC
The new algorithm is implemented and nicely tested in:
http://git.collabora.co.uk/?p=user/cassidy/telepathy-gabble;a=shortlog;h=refs/heads/proxy-round-robin

We shouldn't merge this branch until we switch to proxy.telepathy.im by default as this branch would just add usless traffics to non round robin servers.
Comment 3 Guillaume Desmottes 2009-12-04 06:07:45 UTC
The following branch re-uses the patches from my proxy-round-robin branch which still make sense with the new design of the server. That's basically improving the way Gabble manages the proxies cache.

http://git.collabora.co.uk/?p=user/cassidy/telepathy-gabble;a=shortlog;h=refs/heads/proxy-cache
Comment 4 Guillaume Desmottes 2009-12-04 07:56:13 UTC
This branch, based on the above one, adds support for proxies.telepathy.im

http://git.collabora.co.uk/?p=user/cassidy/telepathy-gabble;a=shortlog;h=refs/heads/proxies
Comment 5 Guillaume Desmottes 2009-12-07 03:25:49 UTC
Merged to 0.8 and master.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.