Commit Graph

35 Commits

Author SHA1 Message Date
Derrick J. Wippler
9f417fbc4f
Improve HTTP error handling (#60) 2023-06-12 12:04:46 -05:00
davidmcleish
3c50bed6df
Use PathEscape instead of QueryEscape (#49) 2022-12-20 11:26:36 -06:00
Derrick J. Wippler
df5395112d Error size now limited to 1MiB 2022-07-28 14:59:57 -05:00
Marnix Bouhuis
131b5ec788
Add HTTP error message from peer to error returned from httpGetter.Get 2022-07-14 12:14:26 +02:00
censhin
bd86e3ce96 fix(http.go): passing body to NewRequestWithContext() in makeRequest() 2021-10-04 16:07:31 -04:00
censhin
26cee4afba fix(http.go): removing variable that doesn't exist 2021-10-04 15:37:49 -04:00
censhin
1081294c45 chore(all): merging master and resolving conflicts 2021-10-04 15:23:05 -04:00
develar
a6ecc9438e simplify code — use NewRequestWithContext API to create request 2021-09-22 15:07:29 +02:00
Derrick Wippler
e5d79909ab Minimal go lang version target is 1.13 2021-05-03 17:43:11 -05:00
Derrick Wippler
1e232d778c Group.Set() now populates the main cache, and optionally the hotcache 2021-05-01 17:02:17 -05:00
censhin
a88b9ce0a6 feat(all): setting a ByteView after marshaling the value into a byte buffer 2021-04-30 11:09:01 -04:00
Tommy PAGEARD
fb2028f2ff fix(): get URL from httpGetter instead of httpPool 2020-07-08 18:59:59 +02:00
Tommy PAGEARD
3f7232faca feat(peer): add GetURL to be able to retrieve peer url 2020-07-08 14:21:49 +02:00
Derrick J. Wippler
76b3cd49b6 Reverted change to associate Transport to httpGetter.
This change caused a data race during async calls to groupcache.Get().
Also discovered `DefaultTransport` has per address connection pooling
only when the request was a success, which is sufficient for most use
cases.
2019-06-04 14:53:24 -05:00
Derrick J. Wippler
2869a0ce28 HTTPPoolOptions.Transport is now used instead of DefaultTransport when provided 2019-06-04 10:02:19 -05:00
Derrick J. Wippler
8b0de5a71a Changed module paths to reflect breaking change v2 2019-06-03 11:08:54 -05:00
Derrick J. Wippler
054f2178b4 Client keep-alives and hotcache changes
* Now Associating the transport with peer `httpGetter` so we take advantage of
  connection reuse.  This lowers the impact on DNS and improves preformance for
  high request volume low latency applications.
* Now always populating the hotcache. A more complex algorithm is unnecessary
  when the LRU cache will ensure the most used values remain in the cache. The
  evict code ensures the hotcache does not over crowd the maincache.
2019-06-03 10:20:40 -05:00
Derrick J. Wippler
f352930de5 Now using context.Context instead of groupcache.Context 2019-05-30 17:03:06 -05:00
Derrick J. Wippler
a5eee224aa http requests now respect context.Context done 2019-05-30 16:47:38 -05:00
Derrick J. Wippler
2e501aa922 Remove() Now returns the body on non 200 response 2019-05-23 15:09:56 -05:00
Derrick J. Wippler
4f7e5ecf8c Added support for key removal within a group 2019-04-11 10:50:29 -05:00
Derrick J. Wippler
a4f69dc48c Changed import path to mailgun/groupcache 2019-04-10 15:09:20 -05:00
Derrick J. Wippler
ce8fe99325 Sinks can not accept an expire time 2019-04-09 17:36:03 -05:00
Steve Phillips
361310ca19 http.go: Added missing word from NewHTTPPool docs 2017-01-09 12:49:55 -08:00
Pierre Durand
8cc54b43f8 use passed options 2016-02-08 09:57:03 +01:00
Ryan Slade
505a8b21f5 Reduce allocations
Store temporary buffers in a sync.Pool.

Create one httpGetter per peer when Set() is called so we don't
allocate a new one on each call PickPeer().
2014-12-16 08:18:07 +00:00
Fumitoshi Ukai
5fb127ef79 goprotobuf has moved to GitHub
code.google.com/p/goprotobuf to github.com/golang/groupcache
2014-11-25 13:24:33 +09:00
awaw fumin
1568598a4f allow all options of HTTPPool to be specified by users 2014-10-20 14:40:48 +08:00
Dvir Volk
21fc61ac51 changed default number of replicas in http pool hash ring to 50, and fixed hash ring benchmark 2014-07-08 12:15:05 +03:00
Dvir Volk
976d66a1f1 removed extra unesacping in http pool that screwed up the keys we were using 2014-06-18 23:00:46 +03:00
Dan Pupius
bdcbf83d9e HTTPPool increments Group.Stats.ServerRequests 2013-10-16 10:57:19 -07:00
Dan Pupius
a06134f0da PeerPicker uses ring hash to pick peers 2013-10-01 19:10:50 -07:00
Fumitoshi Ukai
38eed8b4ba Close body even if it got error http status.
Otherwise, http connections keep open if server
returned error status (e.g. Get returned error).
2013-08-29 22:00:01 +09:00
Andrew Gerrand
3f89d3eb33 fix overflow in peer selection 2013-08-12 12:08:11 +10:00
Andrew Gerrand
0bfcb13dbb add HTTP pool implementation 2013-07-24 14:57:40 +10:00