bitly / go-hostpool Goto Github PK
View Code? Open in Web Editor NEWIntelligently and flexibly pool among multiple hosts from your Go application
License: MIT License
Intelligently and flexibly pool among multiple hosts from your Go application
License: MIT License
Hey,
My linter is giving me
...
[2020-12-16T10:53:16Z] /root/.cache/bazel/_bazel_root/26b87eb8c508ba6300e65749e6032969/sandbox/processwrapper-sandbox/2628/execroot/__main__/external/com_github_bitly_go_hostpool/epsilon_greedy.go:52:27: literal copies lock value from *stdHP: github.com/bitly/go-hostpool.standardHostPool
And lo and behold,
Line 52 in 5d3b4dc
sync.Mutex
.
Fix can be found here.
A common scenario is that there are no downstream services available. In that case this library will panic (referencing first item in an empty list). I'd expect to get an error of some kind from the HostPool.Get()
call. Unfortunately this would change the public API and not be a backwards compatible change.
The package is named hostpool
. This means that HostPool*
prefix shouldn't be needed for HostPoolResponse
. See https://github.com/golang/go/wiki/CodeReviewComments#package-names. Fixing this would be non-backwards compatible change.
I would have assumed "two random choices" would have given a better lower average load.
Given that you're already tracking latency information for epsilon-greedy, implementing two random choices should be fairly straight-forward.
For more information on "two random choices", see http://www.eecs.harvard.edu/~michaelm/postscripts/handbook2001.pdf .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.