Commit Graph

15 Commits (9df46f9d6f06c1206d5a6ce0e081fc4ef59983aa)

Author SHA1 Message Date
Xiang Li e079f87410 proxy: expose proxy configuration 2015-09-15 10:27:51 -07:00
Xiang Li cbe00e4415 Merge pull request #2967 from webner/feature/proxy-config
proxy: added endpoint refresh and timeout configuration values
2015-07-03 11:51:15 -07:00
Brandon Philips 740187f199 *: docs and code %s%maximal%maximum%g
maximum is a more common word, use it instead
2015-06-22 16:06:57 -07:00
Wolfgang Ebner 1264dbe24d proxy: added endpoint refresh and timeout configuration values
the default dial timeout was set to 30 seconds this made the proxy a pain to use
in failure scenarios.

fixes 2862
2015-06-13 09:42:18 +02:00
Yicheng Qin 0589afe605 etcdmain: increase maxIdleConnsPerHost in proxy transport
This PR set maxIdleConnsPerHost to 128 to let proxy handle 128 concurrent
requests in long term smoothly.
If the number of concurrent requests is bigger than this value,
proxy needs to create one new connection when handling each request in
the delta, which is bad because the creation consumes resource and may
eat up your ephemeral port.
2015-06-01 16:19:36 -07:00
Jonathan Boulle f1ed69e883 *: switch to line comments for copyright
Build tags are not compatible with block comments.
Also adds copyright header to a few places it was missing.
2015-01-26 09:53:30 -08:00
Jonathan Boulle 89eac70d09 proxy: add docstrings 2014-11-05 10:30:05 -08:00
Jonathan Boulle 719c57a29d proxy: retrieve ClientURLs from cluster
This is a simple solution to having the proxy keep up to date with the
state of the cluster. Basically, it uses the cluster configuration
provided at start up (i.e. with `-initial-cluster-state`) to determine
where to reach peer(s) in the cluster, and then it will periodically hit
the `/members` endpoint of those peer(s) (using the same mechanism that
`-cluster-state=existing` does to initialise) to update the set of valid
client URLs to proxy to.

This does not address discovery (#1376), and it would probably be better
to update the set of proxyURLs dynamically whenever we fetch the new
state of the cluster; but it needs a bit more thinking to have this done
in a clean way with the proxy interface.

Example in Procfile works again.
2014-10-24 15:54:12 -07:00
Jonathan Boulle 7a4d42166b *: add license header to all source files 2014-10-17 15:41:22 -07:00
Brian Waldon 73504dca41 proxy: determine scheme based on TLSClientConfig 2014-09-23 11:01:58 -07:00
Brian Waldon 1ea3197feb proxy: pass addrs and scheme into newDirector 2014-09-23 11:01:55 -07:00
Brian Waldon b94d0281d4 etcd: use TLS in proxy transport 2014-09-23 10:19:01 -07:00
Brian Waldon fd1f46313a proxy: add readonly handler 2014-09-18 15:05:30 -07:00
Brian Waldon a155f0bda6 proxy: rewrite stdlib ReverseProxy
The ReverseProxy code from the standard library doesn't actually
give us the control that we want. Pull it down and rip out what
we don't need, adding tests in the process.

All available endpoints are attempted when proxying a request. If a
proxied request fails, the upstream will be considered unavailable
for 5s and no more requests will be proxied to it. After the 5s is
up, the endpoint will be put back to rotation.
2014-09-12 22:56:23 -07:00
Brian Waldon e5a482266f proxy: introduce director
The director class drives an httputil.ReverseProxy. This is used when
etcd is deployed in proxy mode.
2014-09-10 18:04:03 -07:00